Closed Bug 60811 Opened 24 years ago Closed 22 years ago

[RFE] User should be able to force HTTP proxy transactions to use HTTP/1.0 exclusively.

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED
mozilla1.0.1

People

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

References

Details

(Whiteboard: [adt2 RTM])

Attachments

(1 file, 4 obsolete files)

This has been extracted from bug 45747. There is a patch for this submitted by ruslan: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=15560 It is a little old, and so it may require some revision.
changed platform to all.
OS: Linux → All
Hardware: PC → All
added RFE to summary.
Summary: User should be able to force HTTP proxy transactions to use HTTP/1.0 exclusively. → [RFE] User should be able to force HTTP proxy transactions to use HTTP/1.0 exclusively.
Blocks: 61691
http bugs to "Networking::HTTP"
Assignee: gagan → darin
Component: Networking → Networking: HTTP
Target Milestone: --- → M19
nominating for moz 0.9
Target Milestone: --- → mozilla0.9
added keyword nsbeta1 (we have a patch that just needs to be resurected).
Keywords: nsbeta1
Status: NEW → ASSIGNED
Keywords: patch
-> 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
my changes for bug 76866 will fix this bug as well.
Depends on: 76866
-> 0.9.2 in favor of fixing other more important bugs for 0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
-> moz1.0
Target Milestone: mozilla0.9.2 → mozilla1.0
nominating for 0.9.5, given the number of people using broken proxies (aka junkbuster)
Keywords: mozilla0.9.5
-> 0.9.5
Target Milestone: mozilla1.0 → mozilla0.9.5
removing incorrect keywords.
Keywords: nsbeta1, patch
Attached patch initial changes to all.js (obsolete) (deleted) — Splinter Review
Attached patch initial changes to protocol/http/src (obsolete) (deleted) — Splinter Review
-> future (this is only important to users who connect both via a proxy server and directly to web servers)
Severity: normal → enhancement
Priority: P3 → P5
Target Milestone: mozilla0.9.5 → Future
would love to squeeze this in for mozilla 1.0
Keywords: mozilla1.0, nsbeta1
Priority: P5 → P3
Target Milestone: Future → mozilla1.0
Blocks: 136956
Attached patch v2 patch (obsolete) (deleted) — Splinter Review
updated to work with today's trunk :-)
Attachment #50659 - Attachment is obsolete: true
Attachment #50994 - Attachment is obsolete: true
Comment on attachment 79481 [details] [diff] [review] v2 patch r=brade tho I wish we had an answer for the XXX comment (ssl tunnel with proxy)
Attachment #79481 - Flags: review+
Comment on attachment 79481 [details] [diff] [review] v2 patch >Index: netwerk/protocol/http/src/nsHttpHandler.cpp >=================================================================== >RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp,v >retrieving revision 1.54 >diff -u -r1.54 nsHttpHandler.cpp >--- netwerk/protocol/http/src/nsHttpHandler.cpp 22 Mar 2002 21:25:58 -0000 1.54 >+++ netwerk/protocol/http/src/nsHttpHandler.cpp 16 Apr 2002 19:11:52 -0000 >@@ -1292,14 +1292,17 @@ > else > mHttpVersion = NS_HTTP_VERSION_1_0; > } >+ } > >- if (mHttpVersion == NS_HTTP_VERSION_1_1) { >- mCapabilities = NS_HTTP_ALLOW_KEEPALIVE; >- mProxyCapabilities = NS_HTTP_ALLOW_KEEPALIVE; >- } >- else { >- mCapabilities = 0; >- mProxyCapabilities = 0; >+ if (PREF_CHANGED(HTTP_PREF("proxy.version"))) { >+ nsXPIDLCString httpVersion; >+ prefs->GetCharPref(HTTP_PREF("proxy.version"), getter_Copies(httpVersion)); >+ if (httpVersion) { >+ if (!PL_strcmp(httpVersion, "1.1")) >+ mProxyHttpVersion = NS_HTTP_VERSION_1_1; >+ else >+ mProxyHttpVersion = NS_HTTP_VERSION_1_0; >+ // it does not make sense to issue a HTTP/0.9 request to a proxy server > } > } where do you end up setting mCompabilities and mProxyCapabilities any more? > >@@ -1787,9 +1790,12 @@ > return NS_ERROR_OUT_OF_MEMORY; > NS_ADDREF(httpChannel); > >- nsresult rv = httpChannel->Init(uri, >- mCapabilities, >- proxyInfo); >+ // select proxy caps if using a non-transparent proxy or ssl tunnel >+ // XXX is this correct for ssl tunnel? >+ PRInt8 caps = (proxyInfo && !nsCRT::strcmp(proxyInfo->Type(), "http")) ? >+ mProxyCapabilities : mCapabilities; >+ >+ nsresult rv = httpChannel->Init(uri, caps, proxyInfo); > > if (NS_SUCCEEDED(rv)) > rv = httpChannel-> This is wrong for ssl tunnels - the CONNECT request will end up using mCapabilities instead od mProxyCapabilities. However, since we can't keep alive or pipeline the CONNECT request, I don't know if this matters.
Attachment #79481 - Flags: needs-work+
bbaetz: mCapabilities and mProxyCapabilities are set when the corresponding prefs are read in and/or changed. these include "network.http.keep-alive" and friends. for SSL tunneling, the proxy info's type has a value of "http", as set via ExamineForProxy, so for SSL tunneling, we would use mProxyCapabilities, not mCapabilities. my XXX comment in the patch is to indicate that perhaps we shouldn't be using proxy capabilities when speaking to a SSL tunnel since after the first transaction it is going to be treated as a transparent proxy.
/me makes mental note to wake up before reviewing patches I misread the arguments for proxies, but if you add a SchemeIs("https") check, then my argument does hold, and I think it is OK. The overhead for CONNECT + ssl setup isn't low, and we should try to minimise this.
i agree.. we probably could trim the fat a bit on our CONNECT message, but let's save that for another bug ;-)
Attached patch v3 patch (obsolete) (deleted) — Splinter Review
revised to use direct connection preferences for SSL tunneling. bbaetz convinced me that this makes perfect sense. also, i checked and the SSL CONNECT request is pretty trimmed down already.
Attachment #79481 - Attachment is obsolete: true
Comment on attachment 79574 [details] [diff] [review] v3 patch This looks fine; I assume you've checked that this is correct, via packet sniffing. r=bbaetz
Attachment #79574 - Flags: review+
Attachment #79574 - Attachment is obsolete: true
Comment on attachment 79658 [details] [diff] [review] v3.1 same thing + a little bit of cleanup i tested this patch w/ brade's latest patch for bug 136956 against a squid proxy. everything checks out :-) carrying forward r=brade,bbaetz
Attachment #79658 - Flags: review+
Comment on attachment 79658 [details] [diff] [review] v3.1 same thing + a little bit of cleanup carrying forward sr=rpotts
Attachment #79658 - Flags: superreview+
fixed-on-trunk
Whiteboard: [fixed-trunk]
Whiteboard: [fixed-trunk] → [fixed-trunk] [RTM]
Target Milestone: mozilla1.0 → mozilla1.0.1
Target Milestone: mozilla1.0.1 → ---
Target Milestone: --- → mozilla1.0.1
Whiteboard: [fixed-trunk] [RTM] → [fixed-trunk][adt2 RTM]
Blocks: 145383
Comment on attachment 79658 [details] [diff] [review] v3.1 same thing + a little bit of cleanup a=chofmann for 1.0.1
Attachment #79658 - Flags: approval+
checked with packet sniffer, was able to switch from HTTP/1.0 to HTTP/1.1 for all proxy transactions verified trunk - 06/04/02 builds - winNT4, linux rh6, mac osX
Whiteboard: [fixed-trunk][adt2 RTM] → [fixed-trunk][adt2 RTM][verified-trunk]
Keywords: adt1.0.1
Changing to Mozilla1.0.1+ per comment #30 From chris hofmann. Resolving as fixedbecause it has been checked, and verified into the trunk adt1.0.1+ (on ADT's behalf) approval for checkin to the 1.0 branch. pls check this in asap, then add the "fixed1.0.1" keyword.
fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-trunk][adt2 RTM][verified-trunk] → [adt2 RTM]
verified per comment #31
Status: RESOLVED → VERIFIED
verified branch - 06/10/02 builds - win NT4, linux rh6, mac osX
Keywords: verified1.0.1
removing fixed1.0.1 keyword
Keywords: fixed1.0.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: