From e2739a3a2405e354c1374ee5763c13582e8a8cd3 Mon Sep 17 00:00:00 2001 From: ph1ll Date: Thu, 15 May 2014 10:31:22 +0100 Subject: [PATCH] modified request priority to allow headers to be removed that have been set by ProtocolSupportModule --- NativeCodeModule/stripheadersmodule.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/NativeCodeModule/stripheadersmodule.cpp b/NativeCodeModule/stripheadersmodule.cpp index 06544c1..6694a7c 100644 --- a/NativeCodeModule/stripheadersmodule.cpp +++ b/NativeCodeModule/stripheadersmodule.cpp @@ -242,6 +242,22 @@ HRESULT __stdcall RegisterModule( DWORD dwServerVersion, IHttpModuleRegistration UNREFERENCED_PARAMETER( dwServerVersion ); UNREFERENCED_PARAMETER( pGlobalInfo ); - // Set the request notifications and exit. - return pModuleInfo->SetRequestNotifications( new StripHeadersModuleFactory, RQ_SEND_RESPONSE, 0 ); + HRESULT hr; + + // Set the request notifications + hr = pModuleInfo->SetRequestNotifications( new StripHeadersModuleFactory, RQ_SEND_RESPONSE, 0 ); + if (FAILED(hr)) + { + return hr; + } + + // Set the request priority. + // Note: The priority levels are inverted for RQ_SEND_RESPONSE notifications. + hr = pModuleInfo->SetPriorityForRequestNotification( RQ_SEND_RESPONSE, PRIORITY_ALIAS_FIRST ); + if (FAILED(hr)) + { + return hr; + } + + return S_OK; } \ No newline at end of file