<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16836</bug_id>
          
          <creation_ts>2008-01-10 23:09:45 -0800</creation_ts>
          <short_desc>JS navigation to host-less HTTP URL (http:/path/to/file) generates error</short_desc>
          <delta_ts>2008-01-11 01:02:40 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Liam Elbourne">liamdav</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66882</commentid>
    <comment_count>0</comment_count>
    <who name="Liam Elbourne">liamdav</who>
    <bug_when>2008-01-10 23:09:45 -0800</bug_when>
    <thetext>When the &quot;General Inquests&quot; link is selected within the url:


&quot;http://www.lawlink.nsw.gov.au/lawlink/coroners_court/ll_coroners.nsf/pages/coroners_information&quot;

 the script called by this link (OpenAttachmentWithFullPath) generates:

&quot;http://lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc&quot;

which should be:

&quot;http://www.lawlink.nsw.gov.au/lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc&quot;

ie the results, if any, of the script are not included.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66884</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-11 00:59:26 -0800</bug_when>
    <thetext>I think the URL is being generated correctly.  The target of the link is:
javascript:OpenAttachmentWithFullPath(&apos;/lawlink/Coroners_Court/ll_coroners.nsf/vwFiles/InquestFAQs.doc/$file/InquestFAQs.doc&apos;)

The function is defined as follows:
function OpenAttachmentWithFullPath ( filePath ) {
   window.open ( &quot;http:&quot; + 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 = &apos;http:/&apos;

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 &quot;http:/&quot; in the address bar.

I wonder what specifies the behaviour of a http:/path/to/file URL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66885</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-11 01:00:24 -0800</bug_when>
    <thetext>I can reproduce this with Safari 3.0.4 on Mac OS X 10.5.x.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66886</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-11 01:01:23 -0800</bug_when>
    <thetext>A simple workaround for the website is to change OpenAttachmentWithFullPath to omit the leading http:.  I&apos;ve never seen http:/path/to/file-style URLs used in the wild before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66887</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-11 01:02:40 -0800</bug_when>
    <thetext>&lt;rdar://problem/5683164&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>