Closed Bug 150763 Opened 22 years ago Closed 21 years ago

Trying to use https on port 80 results in incorrect URL rewrite

Categories

(SeaMonkey :: Location Bar, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bert690, Assigned: hewitt)

Details

If you use HTTPS (SSL) on port 80, then Mozilla 1.0 Build ID: 2002053012
rewrites the URL as if it were using HTTP. That is, if I type:

https://mydomain.com:80/

..in the URL area, it will change to:

https://mydomain.com/

This is WRONG. It should not rewrite the URL. Doing so causes all "relative"
url's in the page to BREAK, e.g. it will force them to attempt to use port 443
(since port 80 is no longer explicitly specified).

While it's unusual to use HTTPS/SSL over port 80, my application does it, and
people using Mozilla therefore can't use it!
Accidentally classified this as a bugzilla bug instead of a browser bug.
Component: Bugzilla-General → URL Bar
Product: Bugzilla → Browser
Target Milestone: --- → mozilla1.0.1
Version: 2.10 → other
-> default owner; resetting target milestone.
Assignee: justdave → hewitt
QA Contact: matty → claudius
Summary: Trying to use https on port 80 results in incorrect URL rewrite → Trying to use https on port 80 results in incorrect URL rewrite
Target Milestone: mozilla1.0.1 → ---
I'd like to add that IMozilla also fails to POST 
to port 80 using https protocol.  Test case was a simple file upload form:

<form action="https://mysite.com:80/UPLOAD.cgi" ENCTYPE="multipart/form-data" 
METHOD=POST><INPUT TYPE=FILE NAME=file>&nbsp;<INPUT TYPE=SUBMIT VALUE="Upload 
File"></FORM>

Works fine with IE and Netscape, but Mozilla results in connection refused error 
-- I suspect because it's trying to use port 443 instead of port 80.
Yet another problem related to this issue. 

Suppose someone uses mozilla 1.0 to visit the following URL:

https://mysite.com:80/foobar

Suppose the response of the webserver to this URL is to redirect to a relative
path, e.g. by setting the HTTP header of the response as follows:

Location: /foobar/

(this is a common result as foobar may be a directory)

With mozilla, this redirect fails (presumably because it tries to use port 443
instead of correctly remaining on port 80). 

It works fine with recent versions IE and Netscape.
If anyone wants to confirm this bug, please feel free to use the following link:

https://replicator-userv.userv.web.cmu.edu:80/

Note that after loading the page, the ":80" disappears.  If you hit reload, the
reload fails since it (incorrectly) tries to reload through port 443.

Relative URL's in the page also fail (e.g. note that Mozilla fails to load the
"shortcut icon" since it is a relative URL in that page, however, if you visit
the above link with http instead of https, it works).
This fix for this issue probably involves like 2 lines of code:

"If (https) { then don't drop ":80" from the URL }"

Is anyone looking into it?
This bug seems to be fixed in v1.3: Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.3) Gecko/20030312

Or am I dreaming?

Good work guys!
marking fixed per reporter's comment
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.