« Previous Next »

Thread: How to add headers to the server error response

Last post 12-08-2008 4:15 PM by anilr. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 12-08-2008, 8:10 AM

    • edigar
    • Not Ranked
    • Joined on 11-27-2008, 11:50 AM
    • Posts 12

    How to add headers to the server error response

     Hi,

    I have following set of questions:

    1) In isapi filter we would use the support function SF_REQ_ADD_HEADERS_ON_DENIAL to add specified  headers to the server error response.

    How should i do the same in native modules?

    2) what is the equivalent of SF_STATUS_REQ_ERROR in native modules API?

  • 12-08-2008, 4:15 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: How to add headers to the server error response

    1) Register for RQ_SEND_RESPONSE, check the status code, and in case of 401 response, add your custom headers using IHttpResponse::SetHeader

    2) There is no direct equivalent, it would be a combination of whether you want to send an error response to the client (IHttpResponse::SetStatus) and/or whether you want to short-circuit the state machine (RQ_NOTIFICATION_FINISH_REQUEST)

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (2 items)
Microsoft Communities