<?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>80172</bug_id>
          
          <creation_ts>2012-03-02 10:38:37 -0800</creation_ts>
          <short_desc>[Chromium] KURL behaves differently</short_desc>
          <delta_ts>2013-04-15 06:26:59 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          <blocked>76198</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Takashi Toyoshima">toyoshim</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bashi</cc>
    
    <cc>brettw</cc>
    
    <cc>ian</cc>
    
    <cc>schenney</cc>
    
    <cc>yutak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>569757</commentid>
    <comment_count>0</comment_count>
    <who name="Takashi Toyoshima">toyoshim</who>
    <bug_when>2012-03-02 10:38:37 -0800</bug_when>
    <thetext>WebSocket uses KURL to validate URL.
But, KURL in Chromium using googleurl behaves differently from Safari.

http://samples.msdn.microsoft.com/ietestcenter/#websockets

The white space (%20) is handled as is in Safari, and escaped like &apos;%20&apos; in Chrome.

[Safari]
&gt; ws = new WebSocket(&apos;ws://foo bar/&apos;)
x Invalid url for WebSocket ws://foo bar
x |&gt; DOMException

[Chrome]
&gt; ws = new WebSocket(&apos;ws://foo bar/&apos;)
  |&gt; WebSocket
&gt; ws.url
  &quot;ws://foo%20bar/&quot;

We just verity the url as

m_url = KURL(KURL(), url);
if (!m_url.isValid()) {
  ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573988</commentid>
    <comment_count>1</comment_count>
    <who name="Takashi Toyoshima">toyoshim</who>
    <bug_when>2012-03-08 11:19:12 -0800</bug_when>
    <thetext>I chat about this issue with Brett.

&gt;Brett,
Sorry, I said that I tried url containing space in path, but actually i tried space in host.

Anyway, this escape is intended in Chromium port.
So, if WebSocket requires additional error check, we should implement own checker.

I filed another bug to introduce WebSocket own URL validator.
https://bugs.webkit.org/show_bug.cgi?id=80616</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>