--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
Node is even nicer.
node> require("url").parse('http://u:p...@example.com/path?arg=1#anchor')
{ href: 'http://u:p...@example.com/path?arg=1#anchor'
, protocol: 'http:'
, slashes: true
, host: 'u:p...@example.com'
, auth: 'u:pw'
, hostname: 'example.com'
, hash: '#anchor'
, search: '?arg=1'
, query: 'arg=1'
, pathname: '/path'
}
The issue is that request.url doens't contain the hash, because the
browser typically doesn't send the hash, so the server doesn't have
it, and can't put it on request.url.
On Fri, Aug 13, 2010 at 21:50, Carl S. Yestrau Jr.
<ca...@featureblend.com> wrote:
> The fragment identifier functions a bit different than the rest of the
> URI. To my understanding its processing is exclusively client-side
> with no involvement with the server. That being said, I've seen it in
> my nginx access logs.
According to the spec, the client MUST send the path portion, but MAY
send the protocol, hostname, and hash. If there is a host header,
then the hostname in the request url MUST match the host header.
Browser behavior is convention only. If node gets the hash, and/or
the hostname, then it will provide it on the request.url.
--i
— Micheil Smith