Archive of UserLand's first discussion group, started October 5, 1998.
ISAPI Programming: Returning Headers
Author: Brent Simmons Posted: 10/12/1998; 1:16:13 PM Topic: ISAPI Programming: Returning Headers Msg #: 206 Prev/Next: 205 / 207
I'm writing an ISAPI MFC DLL. Here's the problem:The DLL calls an external function to get the HTTP response. This response includes the HTTP header followed by HTML text (or an error message, or image data, or whatever).
The header may indicate 200 OK, 404 NOT FOUND, whatever. It may specify any MIME type.
I want to return the entire response -- as-is -- to the client. But -- IIS insists on adding its own 200 OK header to either the beginning or end.
If I use the << operator, then IIS adds its 200 OK header before my header.
If I use WriteClient, then IIS adds its header after my return string.
I've tried calling ServerSupportFunction (HSE_REQ_DONE_WITH_SESSION...) but that doesn't help.
I want to just return a string containing the response header and content body -- and have IIS keep its hands off it.
I don't want to parse and strip the header I'm getting from my return string, then re-build it using ServerSupportFunction.
How can I stop IIS from adding its own header? Is there a method besides WriteClient or the << operator I should use? Or: where is the header being added, and how can I over-ride that?
This page was archived on 6/13/2001; 4:45:40 PM.
© Copyright 1998-2001 UserLand Software, Inc.