Bug 160087 - async xmlhttprequest does not abort when the page is unloaded
Summary: async xmlhttprequest does not abort when the page is unloaded
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-03-30 04:07 UTC by Adam Gundy
Modified: 2010-01-15 19:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
simple test page (267 bytes, text/html)
2008-03-30 04:10 UTC, Adam Gundy
Details
really simple php page to simulate eg comet with long wait time (24 bytes, text/plain)
2008-03-30 04:11 UTC, Adam Gundy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Gundy 2008-03-30 04:07:09 UTC
Version:            (using KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

async xmlhttprequests which are running when a page is navigated away from are not aborted. they continue to hang around until the server responds to the request.

in the case of eg comet, the server may never respond to the request (nothing to notify). eventually the user will hit the maximum number of connections per server, and konqueror will appear to hang. also worth noting that the connections are not dropped when kde is quit - 'klauncher' processes hang around.

firefox correctly (IMHO) aborts these requests when leaving a page. IE doesn't abort and very quickly hits it's connection limit (surprise). konqueror doesn't abort the requests, but it doesn't seem to hit a connection limit either?
Comment 1 Adam Gundy 2008-03-30 04:10:07 UTC
Created attachment 24121 [details]
simple test page

needs the dumb php page too
Comment 2 Adam Gundy 2008-03-30 04:11:00 UTC
Created attachment 24122 [details]
really simple php page to simulate eg comet with long wait time
Comment 3 Adam Gundy 2008-03-30 04:12:44 UTC
a small comment - it certainly should be safe to abort pending 'GET' operations. 'POST' should probably not!
Comment 4 Maksim Orlovich 2008-03-30 04:56:03 UTC
Thanks for the report. 
Comment 5 Adam Gundy 2008-03-30 06:39:37 UTC
another comment.. safari aborts the requests.
Comment 6 Ruchir Brahmbhatt 2009-06-23 14:21:04 UTC
Using konqueror 4.2.90, here klauncher processes don't grow.
Comment 7 Maksim Orlovich 2009-10-30 14:37:41 UTC
A potential cause for bug #187597.
Comment 8 Maksim Orlovich 2010-01-15 19:10:58 UTC
SVN commit 1075245 by orlovich:

- Make sure to cancel non-POST XHR jobs when the related document 
object is destroyed. (#160087)
- Related to this, don't crash trying to emit events when we get 
to changeState w/o a doc (#187597, #214584, #213987, #201053).
Also add some paranoia about that for the methods.
- Handle encoding inside mimetype overrides. (Some demo by Mr. Strigi).

BUG: 160087
BUG: 187597
BUG: 214584
BUG: 213987
BUG: 201053


 M  +32 -6     xmlhttprequest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1075245
Comment 9 Maksim Orlovich 2010-01-15 19:17:53 UTC
SVN commit 1075253 by orlovich:

automatically merged revision 1075245:
- Make sure to cancel non-POST XHR jobs when the related document 
object is destroyed. (#160087)
- Related to this, don't crash trying to emit events when we get 
to changeState w/o a doc (#187597, #214584, #213987, #201053).
Also add some paranoia about that for the methods.
- Handle encoding inside mimetype overrides. (Some demo by Mr. Strigi).

BUG: 160087
BUG: 187597
BUG: 214584
BUG: 213987
BUG: 201053

 M  +32 -6     xmlhttprequest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1075253