Closed
Bug 203631
Opened 22 years ago
Closed 14 years ago
Host header should not include the default port for compatibility with broken servers
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dave, Unassigned)
References
()
Details
(Whiteboard: [have patch])
Attachments
(4 files, 1 obsolete file)
|
38.94 KB,
application/octet-stream
|
Details | |
|
8.24 KB,
application/octet-stream
|
Details | |
|
3.22 KB,
application/octet-stream
|
Details | |
|
1.51 KB,
patch
|
darin.moz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
the url contains a Base64 encoded string (RFC 1521). It seems that the equals
signs at the end of the string, are disturbing the request.
the same url works fine with IE and Opera
Reproducible: Always
Steps to Reproduce:
1.just click on the provided link
2.
3.
Actual Results:
an error is provided by the application.
Expected Results:
a page should be displayed
Comment 1•22 years ago
|
||
Mozilla gives me following error message, Opera7 displays an empty page with a
gif, seems correct if you look at the source.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/20030425 shows:
Forbidden (403)
You have requested data that the server has decided not to provide to you. Your
request was understood and denied.
Not Found (404)
The file that you requested could not be found on this server. If you provided
the URL, please check to ensure that it is correct. If you followed a hypermedia
link, please notify the administrator of that server of this error.
Comment 2•22 years ago
|
||
-> HTTP
Assignee: asa → darin
Component: Browser-General → Networking: HTTP
QA Contact: asa → httpqa
Comment 3•22 years ago
|
||
That url has a session ID embedded. If anyone tries to follow it, it'll just
give a 403, since that person does not have the right IP for the session.
Comment 4•22 years ago
|
||
dave: can you capture packet traces of Mozilla and IE/Opera loading that page?
there's a handy tool available from www.ethereal.com (available for windows and
most platforms) that can help you do this. if you aren't able to do this, then
no problem. but, it sure would help us if you could ;-)
just save each capture to disk and upload the files to this bug report. thx!
Target Milestone: --- → Future
| Reporter | ||
Comment 5•22 years ago
|
||
as you wished
| Reporter | ||
Comment 6•22 years ago
|
||
as you wished
| Reporter | ||
Comment 7•22 years ago
|
||
as you wished
| Reporter | ||
Comment 8•22 years ago
|
||
i added teh desired log files with the required tool ethereal
Comment 9•22 years ago
|
||
dave: awesome! thank you! i'll take a look to see what differs...
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla1.5alpha
Comment 10•22 years ago
|
||
so, both opera and mozilla issue the exact same HTTP request line, but for some
reason the server just doesn't like the full HTTP request from mozilla. one
difference is the host header. mozilla sends this:
Host: www.homegate.ch:80
while opera sends this:
Host: www.homegate.ch
this difference should not matter; however, i seem to recall fixing a bug well
over a year ago to make sure that mozilla does not send the default port number
in the Host header because of the fact that some servers misunderstand it.
dave: can you try loading the URL without the ":80"?
| Reporter | ||
Comment 11•22 years ago
|
||
darin,
your right without the portnumber the request provides the correct result.
so, what will be your next steps?
Updated•22 years ago
|
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Comment 13•22 years ago
|
||
Adds some code to avoid sending in the default port number (for both SSL and
not SSL).
Comment 14•22 years ago
|
||
New Patch. Accomplishes the same things as the old one, but a little more
efficiently.
Attachment #127832 -
Attachment is obsolete: true
Comment 15•22 years ago
|
||
Comment on attachment 127913 [details] [diff] [review]
patch
Review, I think?
Attachment #127913 -
Flags: review?(darin)
Comment 16•22 years ago
|
||
Comment on attachment 127913 [details] [diff] [review]
patch
r+sr=darin (looks good walter.. thx!)
Attachment #127913 -
Flags: superreview+
Attachment #127913 -
Flags: review?(darin)
Attachment #127913 -
Flags: review+
Updated•22 years ago
|
Status: NEW → ASSIGNED
Comment 17•22 years ago
|
||
actually, i started thinking about this bug some more... and a question came up:
why isn't the default port striped from the URL inside nsStandardURL::Init? it
almost seems as if the URL has not been created properly.
this bug is easily reproducible simply by loading http://anyhost:80/ and
watching a network packet trace or HTTP log.
one option would be to try to fix this by modifying the code in
nsStandardURL::BuildNormalizedSpec to have it set mPort = -1 when mPort ==
mDefaultPort. i'm not sure if that would break other things yet... i need to
think about it for a little while ;-)
Summary: the url contains a Base64 encoded string (RFC 1521) → Host header should not include the default port for compatibility with broken servers
Comment 18•22 years ago
|
||
sorry, this one slipped off my radar...
Assignee: waltershen → darin
Status: ASSIGNED → NEW
OS: Windows XP → All
Hardware: PC → All
Target Milestone: mozilla1.5beta → mozilla1.8alpha
Updated•21 years ago
|
Target Milestone: mozilla1.8alpha1 → mozilla1.8beta
Updated•21 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [have patch]
Updated•21 years ago
|
Severity: normal → minor
Status: ASSIGNED → NEW
Priority: -- → P3
Target Milestone: mozilla1.8beta1 → mozilla1.8beta2
Updated•20 years ago
|
Target Milestone: mozilla1.8beta2 → mozilla1.9alpha
Comment 19•19 years ago
|
||
-> default owner
Assignee: darin → nobody
Component: Networking: HTTP → Networking
QA Contact: networking.http → networking
Target Milestone: mozilla1.9alpha → ---
Comment 20•14 years ago
|
||
testcase URL no longer works
Comment 21•14 years ago
|
||
Jason, Honza : Do you think that we should take the patch or if we still want to do a more general solution ?
Comment 22•14 years ago
|
||
> Do you think that we should take the patch or if we still want to do
> a more general solution ?
Patch doesn't apply--the Init code doesn't look like this any more at all.
Are we even sure this is still an issue? No comments from users in 4 years, and the code has changed. Need to verify it's even still an open bug.
Comment 23•14 years ago
|
||
This seems to be wfm if I follow comment#17 and load http://host:80 either with the URL bar or as link in a html document. The port is stripped from the Host Header.
Sorry for the noise
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•