<?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>162885</bug_id>
          
          <creation_ts>2016-10-03 18:43:19 -0700</creation_ts>
          <short_desc>Add tests verifying non-special URL hosts are parsed according to spec</short_desc>
          <delta_ts>2016-10-04 16:17:05 -0700</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Christensen">achristensen</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>annevk</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1236026</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-03 18:43:19 -0700</bug_when>
    <thetext>Add tests verifying non-special URL hosts are parsed according to spec</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236027</commentid>
    <comment_count>1</comment_count>
      <attachid>290547</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-03 18:43:31 -0700</bug_when>
    <thetext>Created attachment 290547
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236030</commentid>
    <comment_count>2</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-03 18:48:08 -0700</bug_when>
    <thetext>The host parsing in https://url.spec.whatwg.org is a deviation from the behavior of Chrome, Firefox, and Safari, and there are no web platform tests verifying that non-special URLs are parsed the same as special URLs.

Try this in different browsers:
alert(new URL(&quot;notspecial://H%4fSt/path&quot;).toString())
It alerts &quot;notspecial://H%4fSt/path&quot; not &quot;notspecial://host/path&quot; as the spec says it should.  
Maybe I missed something in the spec, maybe the spec should be changed, or maybe it was intentional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236109</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2016-10-04 01:36:36 -0700</bug_when>
    <thetext>Thanks, I filed https://github.com/whatwg/url/issues/148. I tend to think we should just change the standard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236211</commentid>
    <comment_count>4</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-04 09:44:16 -0700</bug_when>
    <thetext>I agree.  It will increase compatibility.  But this means the fragment is no longer the only part of the URL that can have non-ASCII characters :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236227</commentid>
    <comment_count>5</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-04 10:16:07 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; But this means the fragment is no longer the only part of the URL that can have non-ASCII characters :(
Oh, never mind.  non-ASCII characters are percent encoded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236429</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-04 16:17:05 -0700</bug_when>
    <thetext>Nope, we don&apos;t want to percent encode things in the host.  I think the spec is right and all browsers are wrong for different reasons.  Everyone needs to change, ours is to punycode encode non-special hosts.
http://trac.webkit.org/changeset/206792</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>290547</attachid>
            <date>2016-10-03 18:43:31 -0700</date>
            <delta_ts>2016-10-04 11:56:17 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-162885-20161003184022.patch</filename>
            <type>text/plain</type>
            <size>1970</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDIwNjc2NCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEzIEBACisyMDE2LTEwLTAzICBBbGV4IENocmlzdGVuc2VuICA8YWNocmlzdGVuc2VuQHdl
YmtpdC5vcmc+CisKKyAgICAgICAgQWRkIHRlc3RzIHZlcmlmeWluZyBub24tc3BlY2lhbCBVUkwg
aG9zdHMgYXJlIHBhcnNlZCBhY2NvcmRpbmcgdG8gc3BlYworICAgICAgICBodHRwczovL2J1Z3Mu
d2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTYyODg1CisKKyAgICAgICAgUmV2aWV3ZWQgYnkg
Tk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgKiBUZXN0V2ViS2l0QVBJL1Rlc3RzL1dlYkNvcmUv
VVJMUGFyc2VyLmNwcDoKKyAgICAgICAgKFRlc3RXZWJLaXRBUEk6OlRFU1RfRik6CisKIDIwMTYt
MTAtMDMgIEFsZXggQ2hyaXN0ZW5zZW4gIDxhY2hyaXN0ZW5zZW5Ad2Via2l0Lm9yZz4KIAogICAg
ICAgICBVUkxQYXJzZXIgc2hvdWxkIGlnbm9yZSB0YWJzIGF0IGFsbCBsb2NhdGlvbnMKSW5kZXg6
IFRvb2xzL1Rlc3RXZWJLaXRBUEkvVGVzdHMvV2ViQ29yZS9VUkxQYXJzZXIuY3BwCj09PT09PT09
PT09PT09PT09PT09PT09PT09P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ifSk7CisgICAgY2hlY2tVUkxEaWZmZXJlbmNlcygi
bm90c3BlY2lhbDovL0glNGZTdCIsCisgICAgICAgIHsibm90c3BlY2lhbCIsICIiLCAiIiwgImhv
c3QiLCAwLCAiLyIsICIiLCAiIiwgIm5vdHNwZWNpYWw6Ly9ob3N0LyJ9LAorICAgICAgICB7Im5v
dHNwZWNpYWwiLCAiIiwgIiIsICJIJTRmU3QiLCAwLCAiIiwgIiIsICIiLCAibm90c3BlY2lhbDov
L0glNGZTdCJ9KTsKKyAgICBjaGVja1VSTERpZmZlcmVuY2VzKCJub3RzcGVjaWFsOi8vSPCfmI3D
n3QiLAorICAgICAgICB7IiIsICIiLCAiIiwgIiIsIDAsICIiLCAiIiwgIiIsICJub3RzcGVjaWFs
Oi8vSPCfmI3Dn3QifSwKKyAgICAgICAgeyIiLCAiIiwgIiIsICIiLCAwLCAiIiwgIiIsICIiLCAi
YWJvdXQ6YmxhbmsifSwgdGVzdFRhYnNWYWx1ZUZvclN1cnJvZ2F0ZVBhaXJzKTsKIH0KIAogVEVT
VF9GKFVSTFBhcnNlclRlc3QsIERlZmF1bHRQb3J0KQo=
</data>
<flag name="review"
          id="313717"
          type_id="1"
          status="+"
          setter="sam"
    />
          </attachment>
      

    </bug>

</bugzilla>