[whatwg] Question about document.referrer (and document.URL, document.location.href) when IDN domains are in use

Ian Hickson ian at hixie.ch
Tue Sep 10 13:14:06 PDT 2013


On Tue, 10 Sep 2013, Ian Hickson wrote:
> > > > 
> > > > In cases when the hostname is non-ASCII, the Referer header will 
> > > > have it encoded in punycode.
> > > 
> > > Is that defined anywhere?
> > 
> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36 which 
> > defines it syntactically as a URI, which means that if you have an IRI 
> > you have to convert it to an IRI before putting it in there.
> 
> That's normatively imported by the HTML spec's "fetch" algorithm, so 
> it's the case per HTML too. Specifically, HTML just says to generate the 
> Referer header's value "as required by HTTP" using a particular URL as 
> the input.

Incidentally, Anne, fetch.spec.whatwg.org seems to have omitted the 
dependency on HTTP so this is broken there, if I'm not mistaken.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list