Closed Bug 564085 Opened 15 years ago Closed 7 years ago

Location bar address does not update in 301 redirect when encounter network problem

Categories

(Firefox :: Address Bar, defect)

defect
Not set
minor

Tracking

()

RESOLVED INACTIVE

People

(Reporter: muzuiget, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100407 Ubuntu/9.10 (karmic) Firefox/3.6.3 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100407 Ubuntu/9.10 (karmic) Firefox/3.6.3 When open a url "http://www.example.com/redirect", the server return a 301 redirect header, then firefox follow to a new url "http://www.youtube.com". If there exist network problem, for example, unable to connect, too long to respond, the connection was reset. The location bar still display the old url, not the new url. Sometime this problem is annoying. When my friend use url shorten service to shorten a long url, and share to me on twitter. The url shorten service will return a "HTTP/1.1 301 Moved Permanently" header. If I inside a firewall, the firewall block the originally url, and reset the connection, I can't view the originally url, so I want to add it to proxy, but the location bar just display the old url, does not update to the new one. firefox just give me a error page, and display "The connection to the server was reset while the page was loading". So I don't know what the new url is, I have to go to the url shorten service official website to expand it manuanlly, then add it to proxy. If location bar display new url, I can know what url is, and copy it directly, add it to proxy, maybe just change it to https. And I find out chromium will update in this situation, and IE and opera the same as firefox. I am not sure this is a bug or feature, I hope firefox can act like chromium. I use Firegesture extension, I can use the script below as temporarily fix. var url = gBrowser.currentURI.spec; gBrowser.removeCurrentTab(); gBrowser.loadOneTab(url, null, null, null, false, false); Yeah, gBrowser.currentURI.spec already update, location bar also should update. Reproducible: Always
Later I find something. If left mouse button click to open the link, location bar will update. If mouse middle button click or paste it to location bar to open new tab, location bar will not update. If the link has target="_blank" attribute, left mouse button click to open tab, also will update.
Here is test link old url http://tinyurl.com/2brqfm9 new url http://127.0.0.1/helloworld.html localhost does not open http service
confirming with SM trunk on win32 The http headers from the testcase : Status: HTTP/1.1 301 Moved Permanently X-Powered-By: PHP/5.3.2 Location: http://127.0.0.1/helloworld.html Content-type: text/html Content-Length: 0 Connection: close Date: Thu, 06 May 2010 03:37:53 GMT Server: TinyURL/1.6 http://www.faqs.org/rfcs/rfc2616.html 10.3.2 301 Moved Permanently The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. The new permanent URI SHOULD be given by the Location field in the response.
Component: General → Networking: HTTP
Product: Firefox → Core
QA Contact: general → networking.http
Version: unspecified → Trunk
Why is this a Necko issue? Comment 1 makes it clear that Necko is generally doing the right things; it's just the UI that's not handling this right. Too bad the right components aren't in Toolkit.
Component: Networking: HTTP → Location Bar
Product: Core → Firefox
QA Contact: networking.http → location.bar
Status: UNCONFIRMED → NEW
Ever confirmed: true
Related to bug 656343?
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.