Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to disable automatic header output in ISAPI extension

37 views
Skip to first unread message

APN

unread,
Jul 25, 2009, 1:49:30 PM7/25/09
to
I'm writing a ISAPI extension where I want to disable the automatic
header generation. In essence, the extension receives a byte stream
from a source. The byte stream already contains appropriate HTTP
headers. I want to directly send the byte stream to the client via
WriteClient but am finding that IIS (I'm using 5.1) will generate the
basic headers itself thereby confusing the client which then thinks
the original headers in the forwarded byte stream are part of the
content data.

Is there a way to tell IIS to not do any header generation itself? My
alternative would be to parse the byte stream, translate the headers
to HSE_REQ_SEND_RESPONSE_HEADER, remove the headers from the forwarded
bytes, all of which would be unnecessary if I could just disable
automatic header generation.

This is using raw ISAPI, not the MFC wrapper.

Thanks in advance,

/Ashok

David Wang

unread,
Jul 25, 2009, 5:58:06 PM7/25/09
to


There is no IIS feature/behavior called "automatic header generation"
to enable/disable. The issue is either with your configuration of IIS
or your own ISAPI implementation.

ISAPI WriteClient writes raw data and will not add anything.

HSE_REQ_SEND_RESPONSE_HEADER will write automatic headers.

If your ISAPI Extension receives a byte stream and then only use
WriteClient to send the response, there will be no automatic response
header. I do this on all IIS versions (5.0, 5.1, 6.0, 7.0) all the
time and never see anything other than what is WriteClient(), as
expected.

If you see any automatic response header, it is likely due to another
ISAPI on the system, either an ISAPI Filter at the global or site
level, or less likely an Wildcard Application Mapping on IIS 5.x.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

APN

unread,
Jul 26, 2009, 9:47:28 PM7/26/09
to

You were exactly right. Thanks.

/Ashok

0 new messages