WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
16836
JS navigation to host-less HTTP URL (
http:/path/to/file
) generates error
https://bugs.webkit.org/show_bug.cgi?id=16836
Summary
JS navigation to host-less HTTP URL (http:/path/to/file) generates error
Liam Elbourne
Reported
2008-01-10 23:09:45 PST
When the "General Inquests" link is selected within the url: "
http://www.lawlink.nsw.gov.au/lawlink/coroners_court/ll_coroners.nsf/pages/coroners_information
" the script called by this link (OpenAttachmentWithFullPath) generates: "
http://lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc
" which should be: "
http://www.lawlink.nsw.gov.au/lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc
" ie the results, if any, of the script are not included.
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-01-11 00:59:26 PST
I think the URL is being generated correctly. The target of the link is: javascript:OpenAttachmentWithFullPath('/lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc') The function is defined as follows: function OpenAttachmentWithFullPath ( filePath ) { window.open ( "http:" + filePath ); } // end of function This results in
http:/lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc
being loaded. Another method of reproducing this bug is to go to
http://webkit.org/blog/
and enter: javascript:window.location = 'http:/' in the address bar and press enter. In Safari this generates an error saying: Safari can’t open the page “http:/” because it’s an invalid address. In Firefox this loads
http://webkit.org/
. What is interesting is that Firefox gives a similar error to Safari if you enter "http:/" in the address bar. I wonder what specifies the behaviour of a
http:/path/to/file
URL?
Mark Rowe (bdash)
Comment 2
2008-01-11 01:00:24 PST
I can reproduce this with Safari 3.0.4 on Mac OS X 10.5.x.
Mark Rowe (bdash)
Comment 3
2008-01-11 01:01:23 PST
A simple workaround for the website is to change OpenAttachmentWithFullPath to omit the leading http:. I've never seen
http:/path/to/file-style
URLs used in the wild before.
Mark Rowe (bdash)
Comment 4
2008-01-11 01:02:40 PST
<
rdar://problem/5683164
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug