when keep-alives disabled, need to send connection: close to the proxy as well as proxy-connection: close

RESOLVED FIXED in mozilla0.9.4

Status

()

Core
Networking: HTTP
P4
trivial
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: bbaetz, Assigned: bbaetz)

Tracking

Trunk
mozilla0.9.4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

17 years ago
This is a minor issue, since we don't support people playing with debug prefs.

My fix for bug 87047 means that we will send proxy-connection: close to a proxy
in that case, but standards conforming proxies which don't understand that will
expect connection: close. We should be nice, and send that instead.

Theres no client-side consequence; this is just to play nice.
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Keywords: correctness
Priority: -- → P4
Target Milestone: --- → mozilla0.9.4

Comment 1

17 years ago
This might be what is causing me trouble with junkbuster.  I have set the

user_pref("network.http.proxy.keep-alive", false);

pref, but it has ceased to work.  (== I get the usual cases where the wrong
hosts are being asked for the wrong pages.)
(Assignee)

Comment 2

17 years ago
No, junkbuster doesn't read connection headers (which is part of the problem)
Have you set the http version to 1.0?

Comment 3

17 years ago
bbaetz: 

Don't you mean that we should send both 'Proxy-Connection: close' and
'Connection: close'?  That seems to be the summary above, but your first comment
uses the word "instead."
(Assignee)

Comment 4

17 years ago
Yes, sorry, I mean "as well as". I clobbered my tree by accident; I have a patch
which I'll test after that finished.
(Assignee)

Comment 5

17 years ago
The patch is (inline because I have other changes):

Index: nsHttpHandler.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp,v
retrieving revision 1.18
diff -u -r1.18 nsHttpHandler.cpp
--- nsHttpHandler.cpp   2001/08/07 20:42:36     1.18
+++ nsHttpHandler.cpp   2001/08/10 21:36:41
@@ -289,6 +289,9 @@
         if (NS_FAILED(rv)) return rv;

         connectionType = "keep-alive";
+    } else if (useProxy) {
+        // Bug 92006
+        request->SetHeader(nsHttp::Connection, "close");
     }

     const nsHttpAtom& connAtom = useProxy ? nsHttp::Proxy_Connection :
nsHttp::Connection;

This has sr=darin.
Keywords: patch

Comment 6

17 years ago
r=gagan
(Assignee)

Comment 7

17 years ago
fix checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Updated

16 years ago
QA Contact: benc → tever
You need to log in before you can comment on or make changes to this bug.