Closed Bug 92006 Opened 23 years ago Closed 23 years ago

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

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla0.9.4

People

(Reporter: bbaetz, Assigned: bbaetz)

Details

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.
Status: NEW → ASSIGNED
Keywords: correctness
Priority: -- → P4
Target Milestone: --- → mozilla0.9.4
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.)
No, junkbuster doesn't read connection headers (which is part of the problem)
Have you set the http version to 1.0?
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."
Yes, sorry, I mean "as well as". I clobbered my tree by accident; I have a patch
which I'll test after that finished.
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
r=gagan
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: benc → tever
You need to log in before you can comment on or make changes to this bug.