Closed Bug 58872 Opened 26 years ago Closed 25 years ago

Proxy: Incorrect Host: header when proxying ftp

Categories

(Core Graveyard :: Networking: FTP, defect, P3)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: tenthumbs, Assigned: dougt)

References

Details

(Keywords: testcase, Whiteboard: Fixed on branch.)

If you use a ftp proxy, then Mozilla generates a Host: test.com header which is clearly spurious. This is coming from a "dummy" URI in netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp. It leaks out. While my Squid proxy could care less, there's no reason to assume that all proxies are so forgiving. Here's an excerpt from the Squid log: 973122423.055 (Wed, 01 Nov 2000 23:47:03 UTC) GET ftp://localhost/pub/fishnet3.jpg HTTP response: 200 Content type: image/jpeg Size: 131591 Cache treatment: TCP_MISS DIRECT from localhost in 6.752 seconds Headers from client: Host: test.com User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18pre18 i686; en-US; m18) Gecko/20001101 Accept: */* Accept-Language: en Accept-Encoding: gzip,deflate,compress,identity Keep-Alive: 300 Connection: keep-alive Headers to client: HTTP/1.0 200 Gatewaying Server: Squid/2.3.STABLE2 Mime-Version: 1.0 Date: Wed, 01 Nov 2000 23:46:57 GMT Content-Type: image/jpeg Content-Length: 131333 Last-Modified: Wed, 01 Nov 2000 23:42:29 GMT
Indeed, I suspect this is my problem here. The organisation I am currently working for has Novell Border Manager installed and ftp URLs simply do not work with Mozilla, whereas they work fine with Netscape 4.08 or IE. Using Proxy - wncproxy:8080 GET ftp://ftp.mozilla.org/pub/ HTTP/1.1 Host: test.com User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001120 Accept: */* Accept-Language: en Keep-Alive: 300 Connection: keep-alive Proxy-Authorization: Basic blah blah blah Thanks.
ftp bugs to component:ftp
Assignee: gagan → dougt
Component: Networking → Networking: FTP
Target Milestone: --- → M19
Blocks: 61691
Blocks: 61167
No longer blocks: 61167
Blocks: 61167
My patch for bug 61167 doesn't help this, because the Host header is set using mHost, which is got directly from the uri passed in to the nsHTTPRequest contructor. Should nsHTTPRequest::SetOverrideRequestSpec update mHost, mURI, etc?
Blocks: 62353
Target Milestone: --- → mozilla0.9
Keywords: nsbeta1
Target Milestone: mozilla0.9 → mozilla0.9.1
Depends on: 76866
qa to me. CONFIRMED on Win32 2001-03-23-19-Mtrunk. Set OS to "ALL"
OS: Linux → All
QA Contact: tever → benc
Whiteboard: Fixed on branch.
Fixes checked in. QA please verify.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
*** Bug 80234 has been marked as a duplicate of this bug. ***
VERIFIED with ethereal, 2001052908 mozilla build
Status: RESOLVED → VERIFIED
Keywords: verifyme
This will be in the proxy unit testcase
Keywords: verifyme → testcase
Summary: Incorrect Host: header when proxying ftp → Proxy: Incorrect Host: header when proxying ftp
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.