I'd like to get the raw http request from a client so I can capture it
- warts and all.
I know it's possible to access the attributes from within a request
using request.env (e.g. request.env["HTTP_ACCEPT"] to get the accept
header). However, I want the actual raw header sent to the server so I
can accurately spoof the client. Building a request from the various
request.env attributes may miss things (like whether the client
incorrently sends "user_agent" or "user-agent") as I assume it does
some housekeeping (plus there could be linefeed issues etc that i'd
like to capture). In essence I want the raw!
I believe it is possible to access what is sent to WebBrick through
the doGet function, but is it possible to abstract it so it'll work on
any server environment and can I get direct access to the header
directly from my application code?