Closed Bug 9040 Opened 26 years ago Closed 26 years ago

When a URL is redirected, the fragment ID is lost

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bert, Assigned: gagan)

References

()

Details

Attachments

(1 file)

When a server sends back a "301 moved permanently" in response to a given URL, Mozilla will get the document from the new location, but will throw away any fragment ID that was attached to the original URL. Example: http://www.w3.org/TR/REC-xml-names#NT-NCName and http://www.w3.org/TR/REC-xml-names/#NT-NCName I expected the two to act the same, but only the latter scrolls to the indicated target. The HTTP 1.1 spec doesn't seem to say anything about this. Of the 12 browsers I tested, only three (Amaya, Spyglass eMosaic, Hotjava) handled the fragment ID the way I expected.
Assignee: don → warren
Component: Browser-General → Networking Library
Assignee: warren → gagan
Assigning to gagan.
Bert: Which version were you checking this with?
How do I find out? I know I used a viewer.exe dated 17-Mar-99 on WinNT (French, v4.0 SP4). I just downloaded M8, and the behavior is still the same (I tried both WinNT and Linux).
Changing all Networking Library/Browser bugs to Networking-Core component for Browser. Occasionally, Bugzilla will burp and cause Verified bugs to reopen when I do this in a bulk change. If this happens, I will fix. ;-)
I've written a small Internet Draft about how I think HTTP should behave: http://www.ietf.org/internet-drafts/draft-bos-http-redirect-00.txt
Status: NEW → ASSIGNED
bert, do you want to check this with the latest nightly builds (new networking library!) at http://www.mozilla.org/binaries.html And then bug gagan again if it doesn't work :-)
QA Contact: leger → paulmac
Updating QA Contact
this is still happening with necko
I have a patch for this, see attachement
modified fix checked in ...
QA Contact: paulmac → tever
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
thanks andreas.
Status: RESOLVED → VERIFIED
Verified fixed in 9/29 builds, both cases work as desired.
In order to fix bug #16418, I needed to remove the code from nsHTTPChannel.cpp which copies over the Param and Query of the original URL into the redirected URL. Now, only the Ref is copied. Is this still OK?
Please have a look at bug 9472. This bug was caused by not transfering the query to the new location. It was fixed with my fix for this one, now it should fail again. Bug 14946 was another version of this problem.
Bulk move of all Networking-Core (to be deleted component) bugs to new Networking component.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: