HTTP waits for response to determine keep-alive state

RESOLVED FIXED in mozilla1.9alpha1

Status

()

Core
Networking: HTTP
--
minor
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Darin Fisher, Assigned: Darin Fisher)

Tracking

({fixed1.8.1})

Trunk
mozilla1.9alpha1
fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
HTTP waits for response to determine keep-alive state

Instead, we should look at the request headers to determine if the request can result in a "keep-alive" response.  If not, then we should immediately treat the request's connection as non-persistent.

Doing so would give XMLHttpRequest users the additional ability to set "Connection: close" as a request header to signal to the HTTP layer that the "AJAX" request is known to take a long time to complete and thereby avoid situations where the web app appears hung waiting on the HTTP layer to give it a connection to use.
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
(Assignee)

Comment 1

12 years ago
Created attachment 210648 [details] [diff] [review]
v1 patch
Attachment #210648 - Flags: superreview?(bzbarsky)
Attachment #210648 - Flags: review?(cbiesinger)
(Assignee)

Comment 2

12 years ago
My one (small) concern with this patch is that specifying "connection: close" on a request that requires NTLM (or SPNEGO) authentication is going to break badly.  This patch doesn't really change that except that it makes the browser enforce the closure instead of relying on the server to do so.  This patch might break something if a server was previously ignoring "connection: close" headers during a NTLM exchange.  It would be really bad for a server to ignore those headers, but that doesn't mean that someone isn't doing it.

It'll be interesting to see if that problem comes up in the field.
So why strcasestr instead of strcasecmp or something?
(Assignee)

Comment 4

12 years ago
Because, they could also have "Connection: close, foo", which means that the "foo" header should not be forwarded by a proxy server.  I need to write a HasToken function instead and use that in many other places throughout the HTTP code.  Using PL_strcasestr is just par for the course and clearly suboptimal.
Comment on attachment 210648 [details] [diff] [review]
v1 patch

OK.  sr=bzbarsky, but let's get a followup filed on HasToken?
Attachment #210648 - Flags: superreview?(bzbarsky) → superreview+
Attachment #210648 - Flags: review?(cbiesinger) → review+
(Assignee)

Comment 6

12 years ago
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

12 years ago
Attachment #210648 - Flags: branch-1.8.1?(bzbarsky)
Attachment #210648 - Flags: branch-1.8.1?(bzbarsky) → branch-1.8.1+
(Assignee)

Comment 7

11 years ago
fixed1.8.1
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.