Question: I'm working on a proxy that will relay connections to another server. I had implemented a `IHttpHandler` that takes requests for a specific address and sends them to my proxy.

My proxy basically starts a sockect connection to the proxied server and reads the original request:

```
var requestString = new StreamReader(httpRequest.InputStream).ReadToEnd();

```

My problem arises at this point: the input stream only contains the stream of the body of the HTTP request, not the complete request.

How can I retrieve the full HTTP Request without having to reconstruct it from the `HttpRequest` object?

Answer: 
I don't know of a definitive one-liner in ASP .NET, but you can get pretty close, as shown in [this](http://forums.asp.net/t/1128496.aspx/) forum post. What is suggested there is to build the first line out of HttpRequest properties, then add `ServerVariables["ALL_RAW"]`, then the request body in the `InputStream` as you're already doing.
The only way to get the 'full HTTP Request' object is to actually reconstruct it in some way. I'm not sure you need the whole object for this process though. Perhaps you could just grab a subset of the items in HttpRequest for processing? You could manually concatenate the various portions of the object you need into something new. Once you deviate from using HttpRequest though, it's all custom to me.