Bug 23402 - multipart/x-mixed-replace doesn't close connection when img removed with Javascript
Summary: multipart/x-mixed-replace doesn't close connection when img removed with Java...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.4
: P2 Minor
Assignee: Nobody
URL: http://r02sdelc.device.mst.edu:8000/i...
Keywords: InRadar, NeedsReduction
Depends on:
Reported: 2009-01-16 21:41 PST by Daniel Welty
Modified: 2011-12-15 17:02 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Welty 2009-01-16 21:41:58 PST
Upon clicking on any of the items in the list at http://r02sdelc.device.mst.edu:8000/ipod/, the webcam loads.  The problem occurs when "Back to List" is clicked.  The javascript removes the img element for the webcam, but the connection stays open, still streaming data for many minutes afterwards.  The connection only closes when the tab/window is closed, or a new page is loaded in that tab.  This is most noticeable in the network activity monitor, and if multiple cameras are opened, one at a time, their connections will build up.
The webcams stream by using multipart/x-mixed-replace http push.  This happens at least with Webkit 525.x through 528+.
Comment 1 Mark Rowe (bdash) 2009-01-16 22:16:30 PST
Comment 2 Doug Norton 2011-12-15 10:12:52 PST
I find this is still the case with 535.14 and on iOS 5.0.1. If you replace the mjpeg to a jpg by setting the src. The image in the webpage is updated to the jpg image but the connection to the mjpeg stays open and continues to stream.

The iPhone does close the connection when a user switches out of the webapp, which is good. But if the user stays in the webapp but is no longer viewing the mjpeg, the connection stays open and bytes are transferred.

I can set up a test case if this would help get this fixed.