Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 530893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:14:39+00:00 2026-05-13T09:14:39+00:00

The ISAPI Filter documentation says I can call SF_REQ_SEND_RESPONSE_HEADER to send the response header,

  • 0

The ISAPI Filter documentation says I can call SF_REQ_SEND_RESPONSE_HEADER to send the response header, and also append additional headers.

ISAPI also has AddResponseHeaders to allow a filter to add additional headers to be sent in the response to the client.

Is there a way, in ISAPI, to remove headers that would otherwise be sent to the client? Or some way to ask the ISAPI runtime to exclude certain headers from the response?
The ISAPI runtime seems to always include a Server: header, and I’d like to find a way to remove that.

I know I can set or unset headers administratively, in the IIS Manager, but that isn’t quite what I want. I want to do it at runtime in the filter, programmatically, and conditionally.

EDIT: BUMP.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:14:40+00:00Added an answer on May 13, 2026 at 9:14 am

    I’ve written several ISAPI’s, including one that had the functionality you describe. I used SF_NOTIFY_SEND_RAW_DATA – I believe the first call will be the header, so you can use:

    FilterContext->ServerSupportFunction(FilterContext, SF_REQ_DISABLE_NOTIFICATIONS, 0, SF_NOTIFY_SEND_RAW_DATA, 0);

    to disable notifications for future raw data. Then in the HTTP_FILTER_RAW_DATA structure you’ve got pvInData, which is the current header, I read in and then write it into a new HTTP_FILTER_RAW_DATA I allocated (remember to use FilterContext->AllocMem for both the structure and pvInData). Once you’re done, write the new header out FilterContext->WriteClient and return SF_STATUS_REQ_READ_NEXT.

    Also, on initialization make sure to set SF_NOTIFY_ORDER_HIGH and SF_NOTIFY_SEND_RAW_DATA.

    From looking through my old code, that’s what I did and it was to specifically remove a header (plus it also added one), so it certainly will perform what you need to do. The only caveat I will say is that I remember something changing related to RAW_DATA from IIS5 (when I wrote this) to IIS6+, but I never needed to update this particular ISAPI, so I don’t know if a chance effected how it’s done or not. Hopefully this helps you out, although you probably at least got a tumbleweed for your question! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an ISAPI filter that can automatically add the Last-Modified header in IIS?
In WIX, I can install an ISAPI filter using the iis:WebFilter element: <Component Id='C.Filter1'
Which IIS 7 ISAPI Filter can help me doing that : http://site1.domain1.com:80 ==> Internal
I want to develop an ISAPI filter which shall read the headers of an
The documentation for the ISAPI SetHeader function says that using '\0' for the value
I'm building an isapi filter that will grab any url requests with the prefix
I wrote this ISAPI filter to rewrite the URL because we had some sites
I have an ISAPI filter that I am using to do URL rewriting for
I'm looking at the product Aptimize Website Accelerator , which is an ISAPI filter
I am using IIRF - an ISAPI rewrite filter for pretty URL's. I haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.