I have an application that gets DOSed if it received incomplete/slow http requests. I debugged and found the reason to be that when I try to access the HTTP Request, the application stalls until the request is complete. I need a way to tell me in the Request is complete or not. something like Request.IsComplete()
EDIT
Example:
protected void Application_BeginRequest()
{
Log(Request["Query"]);
}
The request tries to get Request[Query] forever.
I created a client that can be abstracted as below
socket.Connect(uri.Host, uri.Port);
SendRequest(socket, uri, payload, bytesToTruncate);
socket.Close();
If I go in debug mode, after SendRequest()
, The request goes into Application_BeginRequest()
before socket.Close()
is called, but I will not be able to access Request["Query"]
in Application_BeginRequest
until socket.Close()
is called. It basically stops and waits for the socket.Close/Request
to be complete