<?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>27687</bug_id>
          
          <creation_ts>2014-12-23 18:45:47 +0000</creation_ts>
          <short_desc>Make leading/trailing whitespace and leading colons in pathnames non-conforming</short_desc>
          <delta_ts>2015-08-14 12:22:33 +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>PC</rep_platform>
          <op_sys>Linux</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="Sam Ruby">rubys</reporter>
          <assigned_to name="Sam Ruby">rubys</assigned_to>
          <cc>annevk</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>rubys</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116666</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-23 18:45:47 +0000</bug_when>
    <thetext>urltestdata.txt has the following tests that don&apos;t match the production rules for valid URIs but don&apos;t produce any conformance errors.  This can be fixed with two changes:

A parse error if leading/trailing white space is present in:

https://url.spec.whatwg.org/#concept-basic-url-parser

A parse error if a colon is present in:

https://url.spec.whatwg.org/#relative-path-start-state

 - - -

The corresponding places where the rewritten parser would have to change would be:

https://specs.webplatform.org/url/webspecs/develop/#concept-basic-url-parser
https://specs.webplatform.org/url/webspecs/develop/#path</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116675</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-24 14:30:21 +0000</bug_when>
    <thetext>Here are the tests from urltestdata.txt:

    &quot;\t :foo.com \n&quot;
    &quot; foo.com &quot;
    &quot; \t&quot;
    &quot;:foo.com/&quot;
    &quot;:&quot;
    &quot;:a&quot;
    &quot;:/&quot;
    &quot;:#&quot;
    &quot;:23&quot;
    &quot;::&quot;
    &quot;::23&quot;

Based on discussions with annevk, this should be fixed in https://specs.webplatform.org/url/webspecs/develop/#relative-url instead; in the description for row #4, add a check for the first segment containing a colon and indicating a conformance error if one is found.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116676</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2014-12-25 00:04:20 +0000</bug_when>
    <thetext>Fixed by https://github.com/webspecs/url/commit/a6114157782a7f3d260e2a8d2e8db2e914633f3f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121215</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Ruby">rubys</who>
    <bug_when>2015-06-18 11:34:40 +0000</bug_when>
    <thetext>Fix was only applied to webspecs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122612</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-14 12:22:33 +0000</bug_when>
    <thetext>Thank you. It&apos;s not entirely clear to me why a leading colon is problematic, but I&apos;ve fixed the other missing parse errors and some. If you find out why a leading colon is problematic a GitHub issue would be appreciated.

https://github.com/whatwg/url/commit/0bae5e5608bfc6132937f8f28388c6f796c9a846</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>