Closed Bug 92132 Opened 23 years ago Closed 23 years ago

Typing in path to URLbar loads via file:, adds to history as http [FIX]

Categories

(Core Graveyard :: History: Global, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: jmd, Assigned: pete)

References

Details

(Whiteboard: ns621_sun)

Attachments

(1 file, 2 obsolete files)

If I type in "/home/jmd" in the URL bar and hit entry, file:///home/jmd/ loads, as it should. However, in the history dropdown, it shows up as http:///home/jmd (yes, three slashes too), which doesn't work.
see also 99855 re: URL guessing (www. .com)
argh.. take two at reassigning history bugs to new owner
Assignee: alecf → blakeross
Target Milestone: --- → mozilla1.0
*** Bug 103500 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla1.0 → Future
I'll take this one. Marking target 0.9.8 --pete
Assignee: blakeross → petejc
Priority: -- → P2
Target Milestone: Future → mozilla0.9.8
Status: NEW → ASSIGNED
*** Bug 115990 has been marked as a duplicate of this bug. ***
This bug was introduced by fix to bug 73845. The problem is that we are adding http scheme to url if we can not extract scheme from it. I think this solution was introduced because there was complains on problems in netwerk code if scheme is null. However, urlbar history is supposed to store _exactly_ what was typed in by user. Therefore i propose to remove this default initialization. This is safe because we do not pass this url to netwerk code - we only want to compare it with already stored urls to detect dupe (if any). Other possibility is to save original string from urlbar and add it to the history instead of adding of probably modified one. But this seems to be overkill. I'll attach the patch shortly - please review.
Attached patch Proposed patch (obsolete) — Splinter Review
Attached patch or . . . (obsolete) — Splinter Review
Either of these patches works fine by me. I'll r=attachment 62220 [details] [diff] [review] if we want to keep what the user types. --pete
pete: it looks like your patch does not really fix the problem. it only change it. For example if you type www.mozilla.org in urlbar then it will be stored as file:// ? Also, it does not fix problems reported in dupes for this bug. Anyway, i realized that my patch also is not best. Alternative approach i mentioned (to save original string and add it) seems preferrable because 1) it detects http://www.mozilla.org and www.mozilla.org are dupes 2) it keeps usage of nsIIOService consistent with other places :) I will attach new version of patch.
Also fixes problems from bug 115990 and bug 99855
This looks and works good for me. (From update of attachment 62368 [details] [diff] [review]) r=pete
Attachment #62368 - Flags: review+
Igor, i am trying to get you an sr=. I can check this in for you if need be. --pete
Last suggested fix also should fix the problem reported in bug 57932.
Add status whiteboard keyword
Whiteboard: ns621_sun
Keywords: review
Summary: Typing in path to URLbar loads via file:, adds to history as http: → Typing in path to URLbar loads via file:, adds to history as http [FIX]
Hewitt! sr me bro! A two line patch here! Thanks --pete
*** Bug 118435 has been marked as a duplicate of this bug. ***
Pete, I'm delegating sr= to alecf. Alec, can you field this one? Thanks. /be
I want an r=radha here before I sr=
Summary: Typing in path to URLbar loads via file:, adds to history as http [FIX] → Typing in path to URLbar loads via file:, adds to session history as http [FIX]
radha, can you accommodate us here? This is an easy fix. Thanks --pete
Summary: Typing in path to URLbar loads via file:, adds to session history as http [FIX] → Typing in path to URLbar loads via file:, adds to history as http [FIX]
just looked at this code again - this is urlbar history, and not global history... "history" is vague and could mean global, urlbar or session - there is a big difference - that is why I asked radha to do the review, I know global history well but don't know urlbar history at all. (I was in fact confused when I changed it before to session history)
Component: History: Global → URL Bar
Summary: Typing in path to URLbar loads via file:, adds to history as http [FIX] → Typing in path to URLbar loads via file:, adds to URLBar history as http [FIX]
So alec, can my r= be valid in this case to expediate things along? --pete
Component: URL Bar → History: Global
Summary: Typing in path to URLbar loads via file:, adds to URLBar history as http [FIX] → Typing in path to URLbar loads via file:, adds to history as http [FIX]
and I repeat: > that is why I asked radha to do the review, I know global > history well but don't know urlbar history at all. I want radha to do the review.
The first patch looks OK to me(62220). But I would like you to get a review from its current owner (blake ross or jaggernaut). I think the first patch *may* fundamentally change the way urlbar history does autocomplete. If the autocomplete code assumes the existence of a protocol (default http://) in all the rdf entries, then the proposed patch may break certain autocompletion, like "www.moz" typed into the urlbar may not autocomplete with "http://www.mozilla.org " already present in the database.
If you actually apply the patch, you will see that it doesn't: > break certain autocompletion, like > "www.moz" typed into the urlbar may not autocomplete with > "http://www.mozilla.org " already present in the database. I've been using mozilla w/ this patch for weeks now. urlbar history finally does what it should. --pete
The working patch to be reviewd here is attachment #62368 [details] [diff] [review]. --pete
Attachment #62220 - Attachment is obsolete: true
Attachment #62231 - Attachment is obsolete: true
Comment on attachment 62368 [details] [diff] [review] Alternative patch r=/sr=jag
Attachment #62368 - Flags: superreview+
checked in marking FIXED --pete
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: