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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21378</bug_id>
          
          <creation_ts>2013-03-23 06:54:53 +0000</creation_ts>
          <short_desc>parsing &quot;file:&quot; URL uses base URL scheme instead</short_desc>
          <delta_ts>2013-04-09 13:37:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoff Richards">geoff</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84883</commentid>
    <comment_count>0</comment_count>
    <who name="Geoff Richards">geoff</who>
    <bug_when>2013-03-23 06:54:53 +0000</bug_when>
    <thetext>I&apos;m trying to implement the URL parsing algorithm, but it seems to run
into trouble in the following situation, unless I&apos;m just misunderstanding.

* Parsing input &quot;file:anything&quot; with no state override and no base URL.
* After &apos;:&apos; is found in the scheme state, step 2.3 switches to relative state.
* The next thing that happens, as far as I can see, is that the relative state
  overwrites the &apos;file&apos; scheme with the base URL&apos;s scheme.

It looks like this would always break when, e.g., parsing a &quot;file:&quot; URL in
a page accessed via an &quot;http:&quot; URL, and I don&apos;t know what is supposed to
happen if a base URL isn&apos;t provided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85786</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-04-09 13:27:55 +0000</bug_when>
    <thetext>Well if a base URL is not provided the scheme cannot be &quot;file&quot;. But yes, it seems we should special case &quot;file&quot; in the /relative state/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85787</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-04-09 13:37:21 +0000</bug_when>
    <thetext>https://github.com/whatwg/url/commit/20ac84d65bfd913121aec8c257bf3c9cd6256b50</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>