Closed Bug 93580 Opened 23 years ago Closed 23 years ago

http HEAD requests don't complete until server closes the connection

Categories

(Core :: Networking: HTTP, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: darin.moz, Assigned: darin.moz)

References

()

Details

(Whiteboard: r=bbaetz, sr=brendan)

Attachments

(1 file)

http HEAD requests fail if response includes a body, which can happen if the requested document does not exist (ie. if the response is a 404).
my summary is all wrong. this bug was meant to represent the fact that we don't do HEAD requests well _period_ when using a persistent connection. i've added www.mozilla.org as a test URL even though it returns a 404 when sent a HEAD request (bad mozilla.org!).
Status: NEW → ASSIGNED
Priority: -- → P2
Summary: http HEAD requests fail if response includes a body. → http HEAD requests don't complete until server closes the connection
Target Milestone: --- → mozilla0.9.4
akkana: can you try this patch out with the JS testcase when you get a chance?
Keywords: patch
Blocks: 91388
What if its a 1.0 server without keep-alive? In that case you have called: mResponseHead->SetContentLength(-1); in the if block above. Do you want to override that again? r=bbaetz in either case, since that hack will go away soon, and I don't think it will matter for the HEAD case anyway.
agreed.. thx for the review.
Whiteboard: r=bbaetz, sr=?
With my link-checking JS code on a valid http url (http://www.mozilla.org/unix/customizing.html): Without the patch: I set the request method to head, get a callback for onStartRequest (status 0), with response status 2, but never get an onStopRequest callback. With the patch: I set the request method to head, get a callback for onStartRequest (status 0), with response status 2, then get a callback for onStopRequest (status 0). Are there any known unusual servers that I should also try? Does it matter what my keepalive pref says?
akkana: thanks for testing this. this bug should only effect keep-alive connections. as far as other servers to try, i'm not sure i know of any.
Whiteboard: r=bbaetz, sr=? → r=bbaetz, sr=brendan
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified: Win NT4 2001-09-28-05-0.9.4 Linux rh6 2001-09-28-04-0.9.4
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: