Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

ISAPI Filter for HTTPOnly cookies

$
0
0

I am a newbee to IIS 6 and C++. 

I am trying to implement an ISAPI filter on IIS6. The filter should set all outbound cookies as HTTP only. 

I followed the link: http://msdn.microsoft.com/en-us/library/ms972826to create the HttpFilterProc function.

My GetFilterVersion looks like this:

BOOL WINAPI
GetFilterVersion
( HTTP_FILTER_VERSION *pVer )
{
pVer->dwFilterVersion = HTTP_FILTER_REVISION;
strncpy( pVer->lpszFilterDesc,
"ACookieFilter",
SF_MAX_FILTER_DESC_LEN );

/* Notify me when headers have been processed */
pVer->dwFlags = SF_NOTIFY_PREPROC_HEADERS ;
return TRUE;
}

 the def file looks like this

LIBRARY "HTTPOnly"
EXPORTS
HttpFilterProc
GetFilterVersion

The project output type is changed to dll. Project compiles fine. The ISAPI filter gets loaded fine. But it does not set cookies to HTTP Only. 

I have spent days trying to trouble shoot this issue but no luck. Please suggest a solution to this. 


Viewing all articles
Browse latest Browse all 28058