Closed Bug 241320 Opened 20 years ago Closed 20 years ago

[FIXr]Incorrect link URL generation on pages with a URL of the form 127.0.0.1:port#

Categories

(Core :: Networking, defect, P1)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla1.7final

People

(Reporter: girault, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421

I am accessing a web page with the address http://127.0.0.1:7000.  The page
displays correctly, but when I click on any of the links on that page, I get a
"connection refused" error.  The reason for this is that the generated URL that
the browser is attempting to follow is incorrect because the port number has
been left off the generated URL.

This worked properly in Mozilla version 1.6 and it also works properly in
Microsoft Internet Explorer version 6.0.2800.1106.xpsp2.030422-1633.

The workaround is to type in the proper URL myself.


Reproducible: Always
Steps to Reproduce:
1.  Display a page with a URL of the form http://127.0.0.1:7000
2.  Hover over a relative link such as /archivedbuilds




Actual Results:  
3.  Observe the generated URL at the bottom of the browser window.  It is 
http://127.0.0.1/archivedbuilds

This is the URL that will be followed when the link is clicked.  It is incorrect.

Expected Results:  
4.  It should be http://127.0.0.1:7000/archivedbuilds]

This is the URL that should be followed when the link is clicked.
does your server send a content-location header? check with
http://livehttpheaders.mozdev.org (or a network sniffer)
I used LiveHTTPHeaders to dump the header info.  I attached the resulting .txt
file to this bug.  There is a content-location header:

Content-Location: http://127.0.0.1/index.html

I notice there is no port specified.  Is this the causing the problem?
Yes, it is.  Content-location sets the base URI for the page just like <base
href=""> would.  IE has no support for this header (and neither did Mozilla
1.6), which is why this page works in those browsers.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Although.... maybe we need to add IIS/5.1 to our list of servers that are known
to send bogus headers?  We have 5.0 and 6.0 on the list....

The whack-a-mole continues!
Blocks: 238654
Reopening pending us deciding what to do with IIS....
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
>Although.... maybe we need to add IIS/5.1 to our list of servers that are known
>to send bogus headers?  We have 5.0 and 6.0 on the list....

replace IIS/5.0 with IIS/5. or IIS/5 maybe?
hmmm... yeah, that may be the way to go.
Attachment #146803 - Flags: superreview?(darin)
Attachment #146803 - Flags: review?(cbiesinger)
Comment on attachment 146803 [details] [diff] [review]
Smack the Oracle thing too

>with no spaces before or after the commas.

simplifies the parser, eh? makes reading a bit harder...

sure, r=me. probably doubtful that IIS 6.x x > 0 would fix this problem?
Attachment #146803 - Flags: review?(cbiesinger) → review+
-> bz as he has a patch
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Component: Browser-General → Networking
Ever confirmed: true
Attachment #146803 - Flags: superreview?(darin) → superreview+
bz: can you explain why you "smack[ed] the Oracle thing too"? ;-)

are you sure that all instances of Oracle9iAS need to be blocked?
*** Bug 239845 has been marked as a duplicate of this bug. ***
> bz: can you explain why you "smack[ed] the Oracle thing too"? ;-)
> are you sure that all instances of Oracle9iAS need to be blocked?

We have problems reported with:

Server: Oracle9iAS/9.0.2 Oracle HTTP Server Oracle9iAS-Web-Cache/9.0.3
Server: Oracle9iAS/9.0.2 Oracle HTTP Server Oracle9iAS-Web-Cache/9.0.3.1.0
Server: Oracle9iAS (1.0.2.2.1) Containers for J2EE
Server: Oracle9iAS/9.0.2 Oracle HTTP Server
Server:	Oracle-Application-Server-10g/9.0.4.0.0 Oracle-HTTP-Server
Server: Oracle9iAS (9.0.2.2) Containers for J2EE

within about two weeks.  Now looking at this list, it looks like there's a whole
slew of servers all with slightly different names and all with this problem.  At
this point, I would rather play safe than sorry and be sure that I'm not
breaking any pages.  Since no one out there actually uses this header yet (since
nothing supports it until Mozilla 1.7), there are few drawbacks to blacklisting
the server string "Oracle9iAS" (or indeed "Oracle") for now, until we get a
response from the Oracle folks.

I see that as a slightly more pleasant option than removing support for this
header altogether (which I am also contemplating).
I'll hold off on checking that patch till we come to some sort of agreement on
this...
Priority: -- → P1
Summary: Incorrect link URL generation on pages with a URL of the form 127.0.0.1:port# → [FIXr]Incorrect link URL generation on pages with a URL of the form 127.0.0.1:port#
Target Milestone: --- → mozilla1.7final
Blocks: 241402
Add 

   Server: Oracle9iAS (9.0.3.0.0) Containers for J2EE

to that list.
Blocks: 241065
I've backed out content-location support.
Status: NEW → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: