Jeff Tharp wrote:
> The problem with this approach is that I seem to loose URL fragments,
> such that when I request http://server.domain.com/index.html#anchor,
> orig_uri = "http://server.domain.com/index.html";, not
> "http://server.domain.com/index.html#anchor";.  Is this expected, or am I
> going about this in the wrong fashion?

Jeff,

A superficial analysis of RFC 2396 Section 4.1 and RFC 3986 Section 3.5
suggests the fragment identifiers are exclusively handled by the
user-agent. This makes sense from the common sense perspective:
fragments are internal to the document and the server does not parse the
document, it merely serves it to the user-agent. So the server does not
need to understand fragments.

Simplified: you will never see fragment identifiers on server-side. The
Referer header does not include them either (by virtue of RFC 2616
Section 14.36); so if you really _do_ need them (you shouldn't, to be
honest), you are out of luck. The lack of fragment identifiers is not
only expected behavior; it is mandatory.

I hope this settles your question.

- James Park (pencil_ethics)

Reply via email to