The default bug view has changed. See this FAQ.

pressing enter or copying URL on an http:// site whose hostname begins with "ftp<digit>" results in incorrect URL being loaded/copied

VERIFIED FIXED in Firefox 9

Status

()

Firefox
Location Bar
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: mcpherrin, Assigned: emk)

Tracking

({regression, verified-aurora, verified-beta})

9 Branch
Firefox 11
x86_64
Linux
regression, verified-aurora, verified-beta
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox8 wontfix, firefox9 fixed, firefox10 fixed)

Details

(Whiteboard: [qa!])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
If http site redirects to an FTP download, the url bar doesn't show ftp:// protocol.

If you copy the url from the bar, it does include the ftp:// though.

STR:
http://ftp1.digi.com/pub/shareware/unix/agetty/agetty21.tar
Click cancel on download prompt.
Note url bar doesn't show ftp://
Copy url. Note it is ftp://ftp1.digi.com/pub/shareware/unix/agetty/agetty21.tar
(Assignee)

Comment 1

5 years ago
http://ftp1.digi.com/pub/shareware/unix/agetty/agetty21.tar
responded the download content directly without redirect.
How did you conclude the response was redirected?
(Reporter)

Comment 2

5 years ago
I concluded that because when I copied the url, it was ftp://ftp1.digi.com/pub/shareware/unix/agetty/agetty21.tar instead of an http:// link that I had typed into the address bar.
(Assignee)

Comment 3

5 years ago
Confirmed. It just copies a wrong URL, not a redirect bug.
To reproduce, I had to type the http:// URL in the location bar (clicking the link didn't leave the URL on the location bar).
(Assignee)

Comment 4

5 years ago
The problem is that nsDefaultURIFixup and utilityOverlay.js don't agree about what URI is likely to be FTP.
https://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp#530
https://mxr.mozilla.org/mozilla-central/source/browser/base/content/utilityOverlay.js#637

Updated

5 years ago
Blocks: 665580
(Assignee)

Comment 5

5 years ago
Created attachment 573169 [details] [diff] [review]
Treat also ftp\d+ as FTP host.
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #573169 - Flags: review?(gavin.sharp)
Summary: If http site redirects to an FTP url for download, the url bar doesn't show ftp:// protocol. → pressing enter or copying URL on an http:// site whose hostname begins with "ftp<digit>" results in incorrect URL being loaded/copied
Comment on attachment 573169 [details] [diff] [review]
Treat also ftp\d+ as FTP host.

You should adjust the comment above the line that you're changing in trimURL ("ftp\d*\."), and probably just copy the comment from urlbarBindings.xml's trimValue about the function not changing the URL such that calling createFixupURI will produce a different result.
Attachment #573169 - Flags: review?(gavin.sharp) → review+
(Assignee)

Comment 7

5 years ago
Created attachment 573335 [details] [diff] [review]
Treat also ftp\d+ as FTP host, for check in

Thanks. Adjusted and add comments.
Try submission result (before changing comments):
https://tbpl.mozilla.org/?tree=Try&rev=0ba67c58de78
Attachment #573169 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/6194fd540e16
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → Firefox 11
Thanks for the patch, Kimura-san!
https://hg.mozilla.org/mozilla-central/rev/6194fd540e16
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

5 years ago
Comment on attachment 573335 [details] [diff] [review]
Treat also ftp\d+ as FTP host, for check in

Requesting approval for branches because this is a regression since Firefox 7.
Attachment #573335 - Flags: approval-mozilla-beta?
Attachment #573335 - Flags: approval-mozilla-aurora?
(Assignee)

Updated

5 years ago
Keywords: regression

Comment 12

5 years ago
Comment on attachment 573335 [details] [diff] [review]
Treat also ftp\d+ as FTP host, for check in

[triage comment]
Even though the reward looks low, the risk looks low as well. Approved for beta and aurora. Please land as soon as possible.
Attachment #573335 - Flags: approval-mozilla-beta?
Attachment #573335 - Flags: approval-mozilla-beta+
Attachment #573335 - Flags: approval-mozilla-aurora?
Attachment #573335 - Flags: approval-mozilla-aurora+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Whiteboard: [to aurora and beta]
(Assignee)

Updated

5 years ago
status-firefox10: --- → affected
status-firefox9: --- → affected

Comment 13

5 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/36ccea2bf9e9
http://hg.mozilla.org/releases/mozilla-beta/rev/7e2f5bb2a13f
status-firefox10: affected → fixed
status-firefox8: --- → wontfix
status-firefox9: affected → fixed
Keywords: checkin-needed
Whiteboard: [to aurora and beta]
Whiteboard: [qa+]
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20100101 Firefox/9.0 Firefox Beta4
Mozilla/5.0 (X11; Linux x86_64; rv:10.0a2) Gecko/20111201 Firefox/10.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:11.0a1) Gecko/20111202 Firefox/11.0a1

Verified on Ubuntu 11.10 using F9b4, Firefox Aurora and Nightly using the STR from comment 0. The Url is no longer trimmed for this url and thus the URl is copied appropriately.
Status: RESOLVED → VERIFIED
Keywords: verified-aurora, verified-beta
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.