Closed Bug 89206 Opened 23 years ago Closed 23 years ago

SOCKS: http broken b/c GET malformed

Categories

(Core :: Networking, defect, P1)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: omakarenko, Assigned: gagan)

References

()

Details

(Whiteboard: PDT+, r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch to open)

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.20-0.6.12 i686)
BuildID:    2001070209

When the SOCKS proxy setting is used the browser sends requests in form GET
http://www.slashdot.org/ as if it works through http proxy. It should send
simply GET /. Most sites respond with 403 Forbidden (slsahdot is an example).
Older builds worked ok (before  0.9.1)

Reproducible: Always
Steps to Reproduce:
1. In Prefernces->Advanced->Proxy->Manual proxy Configuration clear everything
except Socks v5 Host.
2. Try to access www.slashdot.org or www.internetword.com


Actual Results:  You get 403 or 404 depending on apache settings. On some sites
GET http://somesite.com / HTTP/1.1 works ok on other s it gives 403 or 404

Expected Results:  Mozilla should send GET / HTTP/1.1 not GET
http://www.slashdot.org/ HTTP/1.1
Without testing, but looking at the code, that seems about right. We're
conditioning this based on the presence of a proxy hostname, and not checking
for socks.

-> me

Reporter, can you confirm if connecting to https sites fails as well through a
socks proxy?
Assignee: neeti → bbaetz
yes, https doesn't work at all when I use socks proxy (and SSL proxy is empty). 

For https://www.platina.ru/ I get "The connection was refused when attempting to
contact www.platina.ru" and I see no network activity (with tcpdump) at all. No
even an attempt to connect to socks server or to the target host. It looks like
if SOCKS5 V5 is not empty Mozilla always tries to use SSL proxy setting no
matter is it empty or not.
OK, confirming. This is bad - I'll try to come up with a patch today.

https appears to be a separate problem - we don't even appear to be talking to
the socks server in that case.
Severity: major → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
Target Milestone: --- → mozilla0.9.3
Well, I'm attaching a fix for http://

However, we send an http request for ftp and for gopher.

And we don't send anything at all for https.

This makes socks support somewhat useless. :(
Status: NEW → ASSIGNED
OK, fixed http and https.

Other protocols now won't try to use socks, and I'll relnote that. See bug
89500.

Patch coming up. dougt/mscott - r/sr for trunk + branch?

dougt - can you PDT+ this as virtual gagan?
Attached patch fixSplinter Review
okay on the http changes for trunk. nogo on the ioserver changes for trunk per 
our discussion.

send mail to pdt2 asking for permission to checkin.  I don't know if I can PDT 
this bug.
Minor quibble: I find
  if (PL_strcmp(foo, "bar") != 0)
more readable than 
  if (PL_strcmp(foo, "bar"))
because it indicates that you know that a zero return means string match (strcmp 
sucks).

sr=sfraser
checked in on trunk.
Whiteboard: r/sr=dougt, sr=smfr, checked in on truck. Waiting for branch approval
Keywords: nsBranch, vtrunk
Whiteboard: r/sr=dougt, sr=smfr, checked in on truck. Waiting for branch approval → r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch approval
Sorry for missing this request for PDT+ last night.  I'm giving it now based on
the description implying that socks for http & https only is better than socks
that mostly doesn't work at all for anything.  Please check in at the
appropriate time and we'll pick this up in the next build.
Whiteboard: r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch approval → PDT+, r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch approval
changed summary.

What was the story w/ HTTPS?
Summary: incorrect GET requests when used with SOCKS proxy → SOCKS: http broken b/c GET malformed
benc: We were trying socks over ssl rather than ssl over socks. Oops.

I'll check this in on the branch once my build completes, and it opens.
-> gagan for checkin on the branch when it opens next week
Assignee: bbaetz → gagan
Status: ASSIGNED → NEW
Whiteboard: PDT+, r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch approval → PDT+, r/sr=dougt, sr=smfr, checked in on trunk. Waiting for branch to open
Fix checked in on the branch as well.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Keywords: vtrunk
VERIFIED:
All plats
07-17-03-0.9.2

NOTE: Mac is transmitting, but failing. Bradley says this was broken before, but
there is no bug, so I created bug 92002.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: