tags:

views:

255

answers:

1

I would like to retrieve the cookies stored in the winhttp session cache based upon a specific host and path that I am about to send a request to. I want to retrieve those cookies before I send the request, so I don't have the request handle yet, all I have is the session and connection handles and of course the path and host I'm going to send the request to.

In other words I would like to retrieve the cookies that winhttp will send to the server before I actually send the request.

Reason I'm asking is because our server checks a specific header, which I have to set, to match an md5 check based upon, amongst other, the cookies. I don't have control over the server code or anything.

Cheers,

A: 

Use the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST notification as a chance to inspect the cookie headers winhttp put by default on the request and then add the md5 header before returning from the callback.

Doubt