Open
Bug 233405
Opened 21 years ago
Updated 2 years ago
nsDefaultURIFixup should accept forward slashes on win32 (e.g. "c:/boot.ini")
Categories
(Core :: DOM: Navigation, enhancement)
Tracking
()
NEW
People
(Reporter: patrick, Unassigned)
References
()
Details
(Whiteboard: [patch] p-iewin)
Attachments
(1 file)
2.35 KB,
patch
|
Details | Diff | Splinter Review |
The URIFixup method used by Firebird and Mozilla should allow the user to type win32 file paths with forward slashes and rewrite it as the appropriate file:// URL. IE allows this; I don't know about other browsers. Steps to reproduce: 1. Type "c:/boot.ini" into the location bar. 2. You should see "file:///c:/boot.ini" in the location bar, and the content of the file in the display pane.
Reporter | ||
Updated•21 years ago
|
URL: c:/boot.ini
Whiteboard: p-iewin
Reporter | ||
Comment 1•21 years ago
|
||
I tried to write this patch so that it A) used the latest nsACString methods B) was least impact on the code Things I could do to the patch: * don't use iterators, use old-fashioned nsACString methods instead * avoided nsCAutoString local copy of aIn unless absolutely necessary by using a pointer instead: nsCAutoString localUri; nsACString *pUri = aIn; [..] if (replacingStuff) { localUri.assign(aIn); // ...do search & replace... pUri = &localUri; } If there is interest in these alternative approaches, let me know.
Reporter | ||
Updated•21 years ago
|
Assignee: location-bar → patrick
Status: NEW → ASSIGNED
Reporter | ||
Updated•21 years ago
|
Attachment #140849 -
Flags: review?(adamlock)
Reporter | ||
Comment 2•21 years ago
|
||
Here is my list of tests for this patch: test cases: (windows) c:/boot.ini ==> file:///c:/boot.ini c://boot.ini ==> c://boot.ini (fails, unsup protocol) c:\\boot.ini ==> file:///c://boot.ini e:/home/.profile ==> file:///e:/home/.profile e:/home ==> file:///e:/home/ e:/home/ ==> file:///e:/home/ c: ==> file:///c:/ c:/ ==> file:///c:/ c:\ ==> file:///c:/ e ==> http://e/ x: ==> file:///x:/ e:foo ==> file:///e:foo test cases: (unix) /etc/passwd ==> file:///etc/passwd / ==> file:///
Reporter | ||
Comment 3•21 years ago
|
||
Comment on attachment 140849 [details] [diff] [review] nsDefaultURIFixup patch Note that the original code checked for both a colon or pipechar in the second position. My new code does not check for the pipechar, because this is a minor bug in the old code. Using a pipechar as a drive separator is a legal URL convention, but it is not a legal Windows way to specify a drive letter. With the code as it stands you could type: c|boot.ini and the fixup code would look for the file "c|boot.ini", which even if it existed would not be what you want.
Reporter | ||
Updated•21 years ago
|
Whiteboard: p-iewin → [patch] p-iewin
Comment 4•21 years ago
|
||
Note bug 232720
Comment 5•19 years ago
|
||
==> docshell
Component: Location Bar → Embedding: Docshell
QA Contact: adamlock
Updated•15 years ago
|
QA Contact: adamlock → docshell
Comment 6•12 years ago
|
||
Gavin, do we still care about this patch?
Comment 7•12 years ago
|
||
Comment on attachment 140849 [details] [diff] [review] nsDefaultURIFixup patch No idea! Comment 0 sounds like a reasonable request, assuming it still applies. This patch no longer applies cleanly, unfortunately.
Attachment #140849 -
Flags: review?(adamlock)
Comment 8•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: patrick → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•