[Bug 17772] New: [URL] The definition of "absolute url" 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...

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17772

           Summary: [URL] The definition of "absolute url" 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...
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#abs
                    olute-url
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec
        AssignedTo: dave.null@w3.org
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: ian@hixie.ch, bzbarsky@mit.edu, mike@w3.org,
                    public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org, julian.reschke@gmx.de,
                    w3c@adambarth.com, public-webapps@w3.org,
                    adrianba@microsoft.com


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 "absolute url" 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 ':' are treated as non-absolute, though in fact
they'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 'Hixie' Hickson                             2010-07-22 05:39:43 +0000 
--------------------------------------------------------------------------------
ws:foo isn't absolute, therefore per spec it'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 
--------------------------------------------------------------------------------
> ws:foo isn'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...

> Are browsers not implementing the spec here?

Nope.  Neither Gecko nor webkit throw on such a url, for example.  In Gecko's
case, because the concept of "absolute url" 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'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 'Hixie' Hickson                             2010-08-13 07:31:20 +0000 
--------------------------------------------------------------------------------
I would like to make this Adam'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 'Hixie' 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 'Hixie' Hickson                             2011-07-08 20:05:50 +0000 
--------------------------------------------------------------------------------
This is a generic platform bug, so I'm moving it out of the WebSockets bucket.
================================================================================

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Friday, 13 July 2012 18:30:42 UTC