<?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>55683</bug_id>
          
          <creation_ts>2011-03-03 09:27:21 -0800</creation_ts>
          <short_desc>KURL parses Windows-style absolute file: URLs incorrectly</short_desc>
          <delta_ts>2016-12-05 11:56:36 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>162660</dup_id>
          
          <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="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>brettw</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>361675</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-03 09:27:21 -0800</bug_when>
    <thetext>Given a URL string like this:

file://c:\foo\bar

KURL will parse it into:

file://c/foo/bar

Note that the colon has disappeared. During parsing, KURL treats the colon as introducing a port number, then sees no port and just ignores it.

A URL string like &quot;file://localhost/c:\foo\bar&quot; will be parsed correctly into &quot;file://c:/foo/bar&quot;, however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361681</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-03 09:33:08 -0800</bug_when>
    <thetext>Is this a regression, and is it normally observable?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361683</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-03 09:35:45 -0800</bug_when>
    <thetext>I don&apos;t think it&apos;s a regression.

It is observable in APIs like WKURLCreateWithUTF8CString correctly for Windows-style paths. See the workaround added in bug 55674, e.g.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361688</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-03 09:38:47 -0800</bug_when>
    <thetext>I haven&apos;t tested whether it&apos;s a regression, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361696</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-03 09:56:20 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; It is observable in APIs like WKURLCreateWithUTF8CString correctly for Windows-style paths.

I meant: it is obvservable in APIs like WKURLCreateWithUTF8CString, which are thus made hard to use correctly for Windows-style file: URLs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361702</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-03 10:06:21 -0800</bug_when>
    <thetext>If it&apos;s a regression, then see also: bug 54090.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361711</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-03-03 10:15:05 -0800</bug_when>
    <thetext>I don&apos;t think this is a regression.  file: urls are complicated, I&apos;ve not done any work on them yet. :)  See related results in:
http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file-expected.txt
http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/relative-win-expected.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361714</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-03 10:17:06 -0800</bug_when>
    <thetext>This result seems particularly relevant:

FAIL canonicalize(&apos;//c:/foo&apos;) should be file:///C:/foo. Was file://c/foo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361878</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-03 13:11:17 -0800</bug_when>
    <thetext>File URLs are tricky.  Most browsers parse them differently depending on whether they&apos;re running on Windows.  Also, the three-slash versus two-slash question is pretty inconsistent.

In any case, eating the &quot;:&quot; is definitely wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361905</commentid>
    <comment_count>9</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2011-03-03 13:48:34 -0800</bug_when>
    <thetext>Chrome has extensive Windows-only filename parsing rules that closely match IE&apos;s behavior.

For some examples, see our unit tests:
http://code.google.com/p/google-url/source/browse/trunk/src/url_canon_unittest.cc
(search for &quot;CanonicalizeFileURL&quot; and you can see there is a big Windows-only block).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361918</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-03 14:04:14 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Chrome has extensive Windows-only filename parsing rules that closely match IE&apos;s behavior.

We&apos;re also running those tests as LayoutTests:

http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/file.js
http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file-expected.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>365237</commentid>
    <comment_count>11</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-10 09:17:03 -0800</bug_when>
    <thetext>&lt;rdar://problem/9114971&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1256419</commentid>
    <comment_count>12</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-12-05 11:56:36 -0800</bug_when>
    <thetext>URLParsing is now done according to spec.
https://bugs.webkit.org/show_bug.cgi?id=162660

*** This bug has been marked as a duplicate of bug 162660 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>