Closed Bug 700566 Opened 13 years ago Closed 13 years ago

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

Categories

(Firefox :: Address Bar, defect)

9 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 11
Tracking Status
firefox8 --- wontfix
firefox9 --- fixed
firefox10 --- fixed

People

(Reporter: mattm, Assigned: emk)

References

Details

(Keywords: regression, verified-aurora, verified-beta, Whiteboard: [qa!])

Attachments

(1 file, 1 obsolete file)

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
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?
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.
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).
Blocks: 665580
Attached patch Treat also ftp\d+ as FTP host. (obsolete) — Splinter Review
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+
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
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
Closed: 13 years ago
Resolution: --- → FIXED
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?
Keywords: regression
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+
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
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.