Fast reads

This commit is contained in:
Pavel Krymets 2018-04-09 15:16:47 -07:00
parent 5e5aa90575
commit 7a14be006d
1 changed files with 18 additions and 10 deletions

View File

@ -206,8 +206,10 @@ http_read_request_bytes(
} }
IHttpRequest *pHttpRequest = (IHttpRequest*)pInProcessHandler->QueryHttpContext()->GetRequest(); IHttpRequest *pHttpRequest = (IHttpRequest*)pInProcessHandler->QueryHttpContext()->GetRequest();
BOOL fAsync = TRUE;
if (pHttpRequest->GetRemainingEntityBytes() > 0)
{
BOOL fAsync = TRUE;
hr = pHttpRequest->ReadEntityBody( hr = pHttpRequest->ReadEntityBody(
pvBuffer, pvBuffer,
dwCbBuffer, dwCbBuffer,
@ -220,6 +222,12 @@ http_read_request_bytes(
// We reached the end of the data // We reached the end of the data
hr = S_OK; hr = S_OK;
} }
}
else
{
// nothing to read
hr = S_OK;
}
return hr; return hr;
} }