locked
Creating HTTP_REQUEST_HEADERS structure for HttpDeclarePush RRS feed

  • Question

  • User-1813431743 posted

    Hi,

    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.

    Thursday, July 5, 2018 12:31 PM

All replies

  • User121216299 posted

    Hi Bodapati,

    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.

    Regards

    Deepak

    Friday, July 6, 2018 3:12 AM
  • User-1813431743 posted

    Hi Deepak,

    Thank you. As per the HttpDeclarePush syntax,

    HTTPAPI_LINKAGE ULONG HttpDeclarePush(
                                   HANDLE RequestQueueHandle,
                                   HTTP_REQUEST_ID RequestId,
                                   HTTP_VERB Verb,
                                  PCWSTR Path,
                                 PCSTR Query,
                                 PHTTP_REQUEST_HEADERS Headers
    );

    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.

    Friday, July 6, 2018 11:16 AM
  • User-1646456974 posted
    No Problem I Will Update You
    Thursday, September 6, 2018 8:55 AM