Closed Bug 64290 Opened 24 years ago Closed 24 years ago

Turning on Keep Alive makes page load indefinitely

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
critical

Tracking

()

VERIFIED INVALID
mozilla0.9

People

(Reporter: slipszi, Assigned: darin.moz)

References

()

Details

Turn on Keep Alive in Preferences > Debug > Networking, and try to load the URL: http://www.yunord.net/cgi/click_counter.cgi?dump=ftp The page will be loaded but the throbber and the status bar will keep on running indefinitely. If you turn off the Keep Alive, the page loads without a problem. Note that the page has no Content-Length specified. This was tested on Win98 running Mozilla build 2000122805.
I think this might be a dupe of bug 39310.
My mistake. It's a dupe of bug 68811.
I think both are duplicates of the same bug. Please reopen if you disagree. *** This bug has been marked as a duplicate of 39310 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Reopening. bug 39310 is lumping too many causes together under the banner 'make it stop spinning'. This bug has a nice, clear definition of a problem and it is 100% reproducible in current builds: loading the above URL will never stop for linux/win32/mac; however, if you disable Keep-Alive, the win32/linux will fire onload (but mac will spin whether Keep-Alive is on or off). I poked at the server with libwww-perl, and the first socket read gets only 155 bytes, which is just the headers. The second read is only 48 bytes. Subsequent reads are all 'short' (ask for 4096 but get ~1400 per read). These are the raw headers: Server: Netscape-Enterprise/3.0C Date: Sun, 18 Mar 2001 05:24:54 GMT Content-type: text/plain; charset=iso-8859-2 Connection: close
Status: RESOLVED → REOPENED
Keywords: mozilla1.0
OS: Windows 98 → All
Hardware: PC → All
Resolution: DUPLICATE → ---
Blocks: 71668
*** Bug 70531 has been marked as a duplicate of this bug. ***
since keepalive is on by default, i'd say this should be fixed before beta1
Recent builds only grab one file per HTTP/1.1 connection (which probably stops the throbber problem, but is not HTTP/1.1 compliant). That is, mozilla forcibly closes the connection after each file despite being sent a 'Connection: keep-alive' header. I'm seeing this in the context of a HTTP/1.1 proxy. Let me know if filing a separate bug would be appropriate, I'm not sure this is related.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9
Severity: normal → critical
Keywords: mozilla1.0
Blocks: 39310
with keep-alives enabled, mozilla receives the following headers: HTTP/1.1 200 OK Server: Netscape-Enterprise/3.0C Date: Tue, 27 Mar 2001 19:13:16 GMT Content-type: text/plain; charset=iso-8859-2 Connection: keep-alive The server provides no indication of when the connection should close. This seems like a misconfigured server to me. It needs to either send a "Connection: close" header or a "Content-length" header or use chunked transfer encoding. Otherwise, the browser will have no way of knowing when to close the connection. Marking INVALID. Please fix your CGI script.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → INVALID
Well, duh. I didn't send a Keep-Alive token when I probed earlier, so yeah I get a 'Connection: close'. Yeah, the server is not doing the right thing. However, aren't we supposed to shut down the socket if the server end disconnects (assuming the server is disconnecting in this case).
john: the server sent "Connection: keep-alive" which means that it is not going to close its end right away.
Yes. But what do we do when the server shuts down its connection even though it has sent Keep-Alive. That is a bogus, brain-dead thing for the server to do, but the web has no shortage of misconfigured servers and flaky connections. If the socket is closed by the server, shouldn't we bail out?
we bail whenever the server closes its end of the connection. in this case, the server does not close its connection right away, b/c it is configured (via keep-alive) to wait for other http requests. we don't send any more requests, b/c we don't know that we're done processing the current request. hence, the page load does not complete until the server connection times out.
Ah, thanks. (Light bulb comes on; I was assuming that the server was shutting down the connection, despite the Keep-Alive, but that's not the case).
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.