<?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>17772</bug_id>
          
          <creation_ts>2012-07-13 18:30:39 +0000</creation_ts>
          <short_desc>[URL] The definition of &quot;absolute url&quot; makes https:foo not an absolute url, since its behavior depends on whether the base is https: or not.  Is that desired?  In particular, using this definition for websockets means that wss: urls with no forward...</short_desc>
          <delta_ts>2012-12-21 14:37:51 +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>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#absolute-url</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>10213</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>adrianba</cc>
    
    <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>public-webapps</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69947</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-13 18:30:39 +0000</bug_when>
    <thetext>This was was cloned from bug 10213 as part of operation convergence.
Originally filed: 2010-07-20 20:37:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2010-07-20 20:37:20 +0000 
--------------------------------------------------------------------------------
Section: http://www.whatwg.org/specs/web-apps/current-work/#absolute-url

Comment:
The definition of &quot;absolute url&quot; makes https:foo not an absolute url, since
its behavior depends on whether the base is https: or not.  Is that desired? 
In particular, using this definition for websockets means that wss: urls with
no forward slashes after the &apos;:&apos; are treated as non-absolute, though in fact
they&apos;re treated as absolute by the browser in practice.

Posted from: 173.48.34.3
================================================================================
 #1   Simon Pieters                                   2010-07-20 21:34:35 +0000 
--------------------------------------------------------------------------------
Changing component so Hixie sees this while working on websockets.
================================================================================
 #2   Ian &apos;Hixie&apos; Hickson                             2010-07-22 05:39:43 +0000 
--------------------------------------------------------------------------------
ws:foo isn&apos;t absolute, therefore per spec it&apos;s treated as non-absolute. Am I missing something? Are browsers not implementing the spec here?
================================================================================
 #3   Boris Zbarsky                                   2010-07-22 05:50:07 +0000 
--------------------------------------------------------------------------------
&gt; ws:foo isn&apos;t absolute,

How is a browser supposed to know that?  Trying to create a URI from that string without a base URI successfully creates one, for example...

&gt; Are browsers not implementing the spec here?

Nope.  Neither Gecko nor webkit throw on such a url, for example.  In Gecko&apos;s case, because the concept of &quot;absolute url&quot; the spec uses (one which resolves to different things depending on the base) matches nothing that Necko exposes, and because by the definition normally used in Gecko (it&apos;s an absolute URL if you can parse it as a url even if there is no base) this url is absolute.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=580234 which is what prompted me to read this section to start with.
================================================================================
 #4   Ian &apos;Hixie&apos; Hickson                             2010-08-13 07:31:20 +0000 
--------------------------------------------------------------------------------
I would like to make this Adam&apos;s problem. Not sure what the status of his URL work is right now.
================================================================================
 #5   Adam Barth                                      2010-08-13 16:39:54 +0000 
--------------------------------------------------------------------------------
Happy for this to be my problem.  The state of the URL work is that I have lots of data to crunch and I need to sit down with a big pot of coffee and crunch it.
================================================================================
 #6   Ian &apos;Hixie&apos; Hickson                             2011-05-24 20:24:47 +0000 
--------------------------------------------------------------------------------
This is now a problem with the WebSocket protocol spec.
================================================================================
 #7   Adrian Bateman [MSFT]                           2011-07-07 21:45:28 +0000 
--------------------------------------------------------------------------------
Section 3 of the protocol spec (http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-09#section-3) shows the valid syntax for a ws-URI. We believe the API should throw a SYNTAX_ERR if the address supplied does not match this format.
================================================================================
 #8   Boris Zbarsky                                   2011-07-07 22:43:47 +0000 
--------------------------------------------------------------------------------
That would be inconsistent with how URIs are handled elsewhere in the web platform...
================================================================================
 #9   Ian &apos;Hixie&apos; Hickson                             2011-07-08 20:05:50 +0000 
--------------------------------------------------------------------------------
This is a generic platform bug, so I&apos;m moving it out of the WebSockets bucket.
================================================================================</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69954</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-07-13 18:59:34 +0000</bug_when>
    <thetext>The URL specification needs to define this. This is part of the reason why we need a whitelist of hierarchical schemes I think (as most browsers appear to have).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71589</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-07-27 06:27:03 +0000</bug_when>
    <thetext>*** Bug 10213 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71596</commentid>
    <comment_count>3</comment_count>
    <who name="Julian Reschke">julian.reschke</who>
    <bug_when>2012-07-27 08:28:23 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; The URL specification needs to define this. This is part of the reason why we
&gt; need a whitelist of hierarchical schemes I think (as most browsers appear to
&gt; have).

It would be good if we had concrete data on which UAs do this, and what for.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71610</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-07-27 14:37:46 +0000</bug_when>
    <thetext>Gecko certainly does, in the form of its set of registered nsIProtocolHandlers, which are what decide how a URI is parsed.  Unknown schemes get handed over to a protocol handler that assume a non-hierarchical URI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74778</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-09-28 10:43:56 +0000</bug_when>
    <thetext>http://url.spec.whatwg.org/ defines this behaviour now and makes browsers&apos; behavior for ws/wss conforming. All that is left here is updating the WebSocket API to refer to the new URL standard.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>