adding forwarding end freb event (#209)

This commit is contained in:
pan-wang 2017-10-23 15:28:48 -07:00 committed by GitHub
parent 448a2afed8
commit c845a331bb
2 changed files with 11 additions and 9 deletions

View File

@ -316,6 +316,7 @@ private:
APP_OFFLINE_HTM *m_pAppOfflineHtm;
APPLICATION *m_pApplication;
bool m_fWebSocketEnabled;
bool m_fHandleClosedDueToClient;
bool m_fResponseHeadersReceivedAndSet;
BOOL m_fDoReverseRewriteHeaders;
@ -325,20 +326,17 @@ private:
BOOL m_fClientDisconnected;
BOOL m_fHasError;
DWORD m_msStartTime;
DWORD m_BytesToReceive;
DWORD m_BytesToSend;
BYTE * m_pEntityBuffer;
DWORD m_cchLastSend;
static const SIZE_T INLINE_ENTITY_BUFFERS = 8;
DWORD m_cEntityBuffers;
BUFFER_T<BYTE*,INLINE_ENTITY_BUFFERS> m_buffEntityBuffers;
DWORD m_cBytesBuffered;
DWORD m_cMinBufferLimit;
BYTE * m_pEntityBuffer;
static const SIZE_T INLINE_ENTITY_BUFFERS = 8;
BUFFER_T<BYTE*,INLINE_ENTITY_BUFFERS> m_buffEntityBuffers;
PCSTR m_pszOriginalHostHeader;
FORWARDING_REQUEST_STATUS m_RequestStatus;
@ -348,8 +346,6 @@ private:
PCWSTR m_pszHeaders;
DWORD m_cchHeaders;
bool m_fWebSocketEnabled;
STRU m_strFullUri;
ULONGLONG m_cContentLength;

View File

@ -2286,6 +2286,12 @@ None
break;
case WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING:
if (ANCMEvents::ANCM_REQUEST_FORWARD_END::IsEnabled(m_pW3Context->GetTraceContext()))
{
ANCMEvents::ANCM_REQUEST_FORWARD_END::RaiseEvent(
m_pW3Context->GetTraceContext(),
NULL);
}
if (m_RequestStatus != FORWARDER_DONE)
{
hr = ERROR_CONNECTION_ABORTED;