spray/spray — pull request #427 by asnare (2013-08-07 09:31:47+00:00)
Title: Update spray can/servlet to allow access to the undecoded request URL.

As discussed on pull request #406:
- access is via a synthetic `Raw-Request-URI` header;
- it is only present when `spray.can.server.raw-request-uri-header` or `spray.servlet.raw-request-uri-header` is set;
- both options default to off.

I decided that it was best to _not_ set this header to the fully normalized header, but rather just the path and query string:
- Including scheme/host/port from a servlet request is impossible to do reliably. We'd have to guess some bits, and then the semantics are a little off: we'd be claiming to provide the raw data from the client without knowing it to be true.
- Most modern requests use the `Host` header for the host/port information anyway, which clients can access independently.

A limitation of the servlet implementation is that it's impossible to detect a request where the target URI includes a full absolute URL with scheme/host/port. (I believe this is common in HTTP/1.0, and is also legal in HTTP/1.1 so long as it is consistent with the `Host` header.)

How does this look?