IIS 7 and Above
Creating HTTP_REQUEST_HEADERS structure for HttpDeclarePush
Last post Sep 06, 2018 08:55 AM by Rasheed Waris
Jul 05, 2018 12:31 PM|Bodapati|LINK
I am trying to implement IIS native server push functionality, HttpDeclarePush function. I was able to build the required arguments except the argument, PHTTP_REQUEST_HEADERS Headers. I was unable to construct the structures
PHTTP_UNKNOWN_HEADER and HTTP_KNOWN_HEADER which are part of HTTP_REQUEST_HEADERS structure. Can any one please guide me how to construct those headers.
Note: 15 days back, when I saw the HttpDeclarePush syntax, the mentioned argument PHTTP_REQUEST_HEADERS is mentioned as optional. But now it is mentioned as mandatory argument.
No idea when it was updated.
Jul 06, 2018 03:12 AM|deepakpanchal10|LINK
Can you inform us how you try to implement HttpDeclarePush
We will try to make a test on our side and try to reproduce the issue.
Jul 06, 2018 11:16 AM|Bodapati|LINK
Thank you. As per the HttpDeclarePush syntax,
HTTPAPI_LINKAGE ULONG HttpDeclarePush(
we got the parameter values,
RequestQueueHandle based on the value returned by HttpCreateRequestQueue function
RequestId based on the siteId value present in the request.
i.e. RequestId = pHttpContext->GetRequest()->GetSiteId()
Verb - Since it is a HttpRequest to get a web page, we considered the value for Verb = HttpVerbGET
Path - got the url of the requested web page and passed it to the argument Path. For ex, path = default.html
Query - the resource path that needs to be pushed. For ex, Query = "\style.css"
Headers - Previously we passed it as NULL as it is mentioned as optional in the syntax when we visit the msdn website 15 days back. But now it was mentioned as Mandatory.
PHTTP_REQUEST_HEADERS is actually a structure which in turns needed two more structure variables PHTTP_UNKNOWN_HEADER and PHTTP_KNOWN_HEADER. We have stuck in creating these two structure variables.
Hope I have given you the required details. Please let me know in case of any further clarifications required.
Sep 06, 2018 08:55 AM|Rasheed Waris|LINK