Closed Bug 474038 Opened 16 years ago Closed 16 years ago

Don't reuse keep-alive connections for both anonymous and non-anonymous requests

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: sicking, Assigned: mayhemer)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

Even though the http spec says that state shouldn't be carried from request to request in a keep-alive connection, there are some protocols that do. Specifically NTLM authenticates the connection rather than each individual request, as I understand it. Because of this I suspect that the http code needs to not reuse the same connection for LOAD_ANONYMOUS and non-LOAD_ANONYMOUS channels, and instead cache the two separately. Though it could be that our NTLM implementation always grab separate channels and so this is not a problem in our code?
Flags: blocking1.9.1+
I think this should make the test for bug #466080 fail when bug #469228 has been fixed.... or do I miss something?
Should this be a beta3 blocker?
IMHO no, but of course the earlier the better.
Priority: -- → P2
-> me
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attached patch v1 (obsolete) (deleted) — Splinter Review
I added new anonymous distinguish flag to HashKey string used to map persistent connection in mCT hash table of the http connection manager. There is currently no way to have an automated test for this, we are waiting for httpd.js update to support keep-alives. I just tested manually with two of my sites and a simple script.
Attachment #357894 - Flags: review?(darin.moz)
Whiteboard: [has patch][needs review darin]
Comment on attachment 357894 [details] [diff] [review] v1 It'd be great to get darins review, but I'm not sure how accessible he is these days. Page looks great to me though.
Comment on attachment 357894 [details] [diff] [review] v1 I'd say bz also knows this code well.
Attachment #357894 - Flags: review?(darin.moz) → review?(bzbarsky)
Whiteboard: [has patch][needs review darin] → [has patch][needs review bzbarsky]
Actually, I don't know the guts of the HTTP stuff (connection/transaction/etc) at all..
Ok, because there is no way to test now, I will wait with this until darin or biesi take a look. When there is a test environment sooner than review I'll create a test and land it. OK?
Whiteboard: [has patch][needs review bzbarsky] → [has patch][needs review cbiesinger]
Attachment #357894 - Flags: review?(bzbarsky) → review?(cbiesinger)
Depends on: 466080
Attachment #357894 - Flags: review?(cbiesinger) → review-
Comment on attachment 357894 [details] [diff] [review] v1 Why don't you follow the same pattern as for mUsingHttpProxy/mUsingSSL? I.e. add a PRPackedBool member variable and change the string in SetOriginServer. + // The third dot is preserved for marking this connection + // as anonymous. For such connections existing keep alive + // non-anonymous connections must not be reused. this comment doesn't really seem to belong here, maybe change the comment above instead (the "the hash key uniquely..." one)
(In reply to comment #11) > (From update of attachment 357894 [details] [diff] [review]) > Why don't you follow the same pattern as for mUsingHttpProxy/mUsingSSL? I.e. > add a PRPackedBool member variable and change the string in SetOriginServer. > You mean to have a flag used at the moment we build the key string? I cannot because nsHttpConnectionInfo is created in nsHttpChannel::Init where also the key is created but anonymity usage is known at the moment of AsyncOpen. At that moment I have the only chance to modify the key string before it's used to map the connection on the connection manager.
Comment on attachment 357894 [details] [diff] [review] v1 Re-requesting review as per comment 12.
Attachment #357894 - Flags: review- → review?(cbiesinger)
Attachment #357894 - Flags: review?(cbiesinger) → review+
Comment on attachment 357894 [details] [diff] [review] v1 oh, true. good point. mention that in the comment you're adding?
Attachment #357894 - Attachment is obsolete: true
Attachment #364088 - Flags: review+
Keywords: checkin-needed
Whiteboard: [has patch][needs review cbiesinger] → [has patch]
Attachment #364088 - Attachment description: v1 + r comments → v1 + r comments [Checkin: Comment 16]
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch] → [needs 1.9.1 landing]
Target Milestone: --- → mozilla1.9.2a1
Attachment #364088 - Attachment description: v1 + r comments [Checkin: Comment 16] → v1 + r comments [Checkin: Comment 16][Checkin comment 17 on 1.9.1]
Whiteboard: [needs 1.9.1 landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: