Hi,

I've found these articles:
http://support.microsoft.com/default.aspx?scid=kb;en-us;q311852
http://support.microsoft.com/default.aspx?scid=kb;en-us;q327611

First of all I've got a question. READ_RAW_DATA can be used to modify the
request body not only the headers. Why is it gone? If you don't want to
modify its behavior you should add a new notification type (input and output
as well) only for modifying the entity body.

But my main question is that this article says that IIS 6 operates quite
different in IIS 5 mode.

I section "SSL in IIS 6.0" I've read that in IIS 5 mode IIS 6 hosts SSL and
filters can use SF_NOTIFY_READ_RAW_DATA. This can mean one of the two tings:
1. IIS 6 is not using HTTP API at all.
In this case a lot of HTTP API based things can be broken, including HTTP
API based Windows system services and SQL Server Yukon's web services. If
it's the truth is a very strange thing.

2. IIS 6 is using undocumented HTTP API calls that make it possible to
process the raw data.
In this case you should document these APIs as they could be used by others.

httpapi.dll exports some undocumented functions (without header
declarations) that are used only by IIS. But as HTTP API is an operating
system service and not part of IIS I think you should document all the
functionality of HTTP API.

Sincerely,
Kornél

Re: IIS and HTTP API by David

David
Sat Jun 19 05:02:05 CDT 2004

Thanks for the query. I've actually not seen either of these KBs until now,
but I can tell you that the KB is wrong to say that SSL in IIS6 uses the
SF_NOTIFY_READ_RAW_DATA filter notification to function. It does not. SSL
in IIS6 is not an ISAPI Filter. I'm also going to try to clarify the info
in 311852 because I think the usage of the words "READ_RAW_DATA" and
"SF_NOTIFY_READ_RAW_DATA" are quite erratic/confusing, and I'm also going to
work to get these KBs fixed.

The crux of what is going on is this (rough conceptual details):

HTTP.SYS basically:
1. reads data from the networking layer
2. parses it
3. does some basic HTTP-level validations according to HTTP/1.1 spec
4. routes it to a user mode process for request execution.

All of these steps happen in kernel mode.

Two concepts muck with this architecture in IIS -- SSL and
SF_NOTIFY_READ_RAW_DATA filters. Both concepts require access to the raw
data stream prior to it being parsed by HTTP.SYS, meaning that it has to be
somehow interjected between steps #1 and #2 above. Since we cannot just
execute existing SF_NOTIFY_READ_RAW_DATA filters (which are user mode DLLs)
in kernel mode, this means that HTTP.SYS will need to have some "mechanism"
to stream raw data from #1 into a user mode process, let it munge the data
however it wants, and then return the data to HTTP.SYS in kernel mode for #2
and continue request handling. Needless to say, this is quite a privileged
operation.

Thus, both SSL and SF_NOTIFY_READ_RAW_DATA rely on this "mechanism" to
stream raw data from kernel mode into user mode and back, prior to step #2.
Now, HTTP.SYS happens to only support this "mechanism" for a SINGLE user
mode process for various technical reasons (including the fact that host
headers are not known [SF_NOTIFY_READ_RAW_DATA could change it as well]).

Therefore, all requests that require SSL and/or SF_NOTIFY_READ_RAW_DATA go
through this mechanism -- first, the data is read in kernel mode, then
transitioned into user mode to munge/decrypt, then transitioned back into
kernel mode to parse, and later shuttled back into user mode to execute.
Not very pretty, but it works and is not the default case.

Now, what does this have anything to do with IIS6 modes? Well, in IIS5
Compatibility Mode, the "mechanism" can use inetinfo.exe as the lone user
mode process to handle the raw data since both ISAPI Filters and SSL needs
to run in that process anyway for compat reasons, and so
SF_NOTIFY_READ_RAW_DATA is cleanly supported.

This all breaks down in IIS6 Worker Process Isolation Mode because
individual w3wp.exe load their own ISAPI Filters -- so multiple instances of
the same Filter DLL can be in memory in separate w3wp.exe -- and what
happens if this Filter uses SF_NOTIFY_READ_RAW_DATA ? We now have >1
process wanting the raw data routed to it, but HTTP.SYS can only route to a
single process. Now, you may argue that we should have spun up one single
surrogate process to host all ISAPI Filters and SSL, but this design
destroys Worker Process Isolation Mode -- this surrogate process is once
again a single point of failure for all w3wp.exe and is no better than the
IIS5 process model (substitute inetinfo.exe for the single surrogate process
and you get the same looking picture). All of the other designs at trying
to enable SF_NOTIFY_READ_RAW_DATA in IIS6 Worker Process Isolation Mode have
other similar but fatal flaws.

So, the whole SF_NOTIFY_READ_RAW_DATA concept just does not work with Worker
Process Isolation Mode, and hence we did the next best thing -- disable the
broken concept, but give a better alternative that allows 99.9% of people to
do what they actually wanted to do and live with breaking that 0.1%:
1. Let SSL have the lone raw data "mechanism" and host it in lsass.exe to
have only one process involved in decrypting/encrypting data
2. Disable SF_NOTIFY_READ_RAW_DATA in IIS6 Worker Process Isolation Mode
3. Make sure that the new IIS6 feature, HSE_REQ_EXEC_URL, can take care of
the 99.9% usage case of SF_NOTIFY_READ_RAW_DATA (which is the munge the
incoming request, in particular POST entity body from FORMs)

From my perspective, the main users that are left in the cold by this
decision are the people who wrote proprietary opaque stream filters, such as
custom encryption/compression, and want to run in IIS6 Worker Process
Isolation Mode. There are no solutions in this case other than IIS5
Compatibility Mode.

Your suggestion of "...If you don't want to modify its behavior you should
add a new notification type (input and output as well) only for modifying
the entity body." was considered at one point, but we rejected it. We
already introduced HSE_REQ_EXEC_URL in ISAPI Extension in IIS6 to handle the
99.9% usage case of modifying the entity body, and ISAPI Filter is not the
preferred IIS extension mechanism (ISAPI Extension is far richer and
deterministic), so we chose not to add any new filter notifications.

So, if your whole reason for SF_NOTIFY_READ_RAW_DATA is to get access and
control of the incoming request, there are better and supported ways of
doing this in IIS6. Configure a ISAPI Extension as a Wildcard Application
Mapping and use HSE_REQ_EXEC_URL. You will notice that HSE_REQ_EXEC_URL is
able to modify the entire request that is processed by IIS, including URL,
headers, entity body, IIS impersonation token, and some ServerVariable
values (like AUTH_TYPE, AUTH_USER, LOGON_USER, etc), and when configured as
a Wildcard Application Mapping, it gets first crack at all the requests and
can filter/redirect as it pleases. HSE_REQ_EXEC_URL is even able to consume
and otherwise munge the entire entity body without the child URL realizing
it, and it is fully compatible with SSL.

This is basically what most people want to do on the server, and IIS6 gives
it to you in that manner. We didn't have this in prior versions of IIS, so
people have had to hack together Filters using SF_NOTIFY_READ_RAW_DATA to
buffer and modify incoming requests (including entity body) -- which doesn't
work with SSL, SF_NOTIFY_PREPROC_HEADERS filter and combo ISAPI Extension if
you just want to change URL, headers, and fudge some ServerVariable values
if you coordinate with SF_NOTIFY_AUTHENTICATION, and so on.
HSE_REQ_EXEC_URL has none of those hacky limitations -- you simple change
the entire request that gets executed by IIS and then tell IIS to execute
it.

You can still do all those hacky things in IIS5 Compatibility Mode (that's
what compatibility is for), but we highly discourage it in IIS6 Worker
Process Isolation Mode because there are better alternatives. If we didn't
have better alternatives, we would have made sure that
SF_NOTIFY_READ_RAW_DATA remained the same in all modes.

If you want to treat HTTP logically, such as URL, headers, entity-body, you
can either do the hard work of parsing through data stream as with the APIs
you're asking about, or you can use the logical API of HSE_REQ_EXEC_URL to
modify the exact same thing prior to IIS executing the request. I leave it
up to you to decide which is easier and makes more sense.

Personally, I suggest that you don't get hung up on SF_NOTIFY_READ_RAW_DATA
nor HTTPAPI -- you're really not "losing" anything important other than a
big hairball mess.

As for your statement in #2 about IIS6 using undocumented HTTP API to
process the raw data -- I am not a lawyer nor am I authoritative on the
subject, but I can tell you that:
1. The IIS and HTTP.SYS teams spent a lot of time with the lawyers, who
grilled us over all of this
2. Legally, IIS6 is considered a part of Windows Server 2003 OS; thus this
is merely a private API between two OS components -- which is perfectly
acceptable by the consent decree.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Kornél Pál" <anonymous@discussions.microsoft.com> wrote in message
news:OKgwiR%23UEHA.3012@tk2msftngp13.phx.gbl...
Hi,

I've found these articles:
http://support.microsoft.com/default.aspx?scid=kb;en-us;q311852
http://support.microsoft.com/default.aspx?scid=kb;en-us;q327611

First of all I've got a question. READ_RAW_DATA can be used to modify the
request body not only the headers. Why is it gone? If you don't want to
modify its behavior you should add a new notification type (input and output
as well) only for modifying the entity body.

But my main question is that this article says that IIS 6 operates quite
different in IIS 5 mode.

I section "SSL in IIS 6.0" I've read that in IIS 5 mode IIS 6 hosts SSL and
filters can use SF_NOTIFY_READ_RAW_DATA. This can mean one of the two tings:
1. IIS 6 is not using HTTP API at all.
In this case a lot of HTTP API based things can be broken, including HTTP
API based Windows system services and SQL Server Yukon's web services. If
it's the truth is a very strange thing.

2. IIS 6 is using undocumented HTTP API calls that make it possible to
process the raw data.
In this case you should document these APIs as they could be used by others.

httpapi.dll exports some undocumented functions (without header
declarations) that are used only by IIS. But as HTTP API is an operating
system service and not part of IIS I think you should document all the
functionality of HTTP API.

Sincerely,
Kornél




Re: IIS and HTTP API by Kornél

Kornél
Sat Jun 19 06:19:51 CDT 2004

Thank you very much for your detailed response.

I have one more question:
Can I use an ISAPI filter and extension combination without creating a
virtual directory with "Scripts and Executables" execute permission?
I've tried to use SF_NOTIFY_URL_MAP to map a fixed path to the filter DLL,
but this requires execute permission in the directory I specify as the fixed
path.

Now I'm sure that IIS 5.0 compatibility mode doesn't brake HTTP API and
thank you for the information about HSE_REQ_EXEC_URL as I didn't know that
it can modify the entity body, I thought it can only append things before or
after the child response entity body but now I know that this is much better
than HSE_REQ_EXECUTE_CHILD.

And of course I didn't want to go into legal details, I only wanted to
suggest you to make HTTP API more flexible and useful.

Sincerely,
Kornél



Re: IIS and HTTP API by David

David
Sun Jun 20 05:43:18 CDT 2004

Can you explain to me what you are trying to accomplish. What you are
describing is by-design behavior.

SF_NOTIFY_URL_MAP happens after IIS has already decided whether to
download/script/execute the URL. Changing pszPhysicalPath from one file
type to another is just not going to work, by-design.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Kornél Pál" <anonymous@discussions.microsoft.com> wrote in message
news:eL6sV9eVEHA.2944@tk2msftngp13.phx.gbl...
Thank you very much for your detailed response.

I have one more question:
Can I use an ISAPI filter and extension combination without creating a
virtual directory with "Scripts and Executables" execute permission?
I've tried to use SF_NOTIFY_URL_MAP to map a fixed path to the filter DLL,
but this requires execute permission in the directory I specify as the fixed
path.

Now I'm sure that IIS 5.0 compatibility mode doesn't brake HTTP API and
thank you for the information about HSE_REQ_EXEC_URL as I didn't know that
it can modify the entity body, I thought it can only append things before or
after the child response entity body but now I know that this is much better
than HSE_REQ_EXECUTE_CHILD.

And of course I didn't want to go into legal details, I only wanted to
suggest you to make HTTP API more flexible and useful.

Sincerely,
Kornél




Re: IIS and HTTP API by Kornél

Kornél
Sun Jun 20 06:40:09 CDT 2004

I have an ISAPI filter and extension DLL (2 in 1).

The filter uses SF_NOTIFY_PREPROC_HEADERS to decide whether to process the
request using the extension or to leave it is as is.

Then I use SetHeader("URL", "/scripts/filter_extension.dll") to be the
request processed by the extension and SF_NOTIFY_URL_MAP to map
"/scripts/filter_extension.dll" to the physical path of the DLL.

This works but needs "Scripts and Executables" permission on the "/scripts"
directory.
Is there any (other) way to bypass this permission requirement and can be
installed only as a filter?

Sincerely,
Kornél



Re: IIS and HTTP API by David

David
Sun Jun 20 15:48:48 CDT 2004

The behavior is by-design and cannot be bypassed.

If a request is going to end up executing ISAPI Extension, it is either
scriptmapped to it (so "Scripts" is needed) or directly (so "Scripts and
Executables" is needed).

When you call SetHeader("URL", "/scripts/filter_extension.dll"); , you just
changed the URL that IIS is going to process -- and if you want it executed
as an ISAPI, you need to have "Scripts and Executables" permission enabled
on /scripts.

You can change the requirement to just "Scripts" if you add a ScriptMap
extension to your ISAPI Extension on the /scripts vdir -- i.e. scriptmap
.myext to filter_extension.dll in the /scripts vdir, and you can call
SetHeader("URL", "/scripts/FileExists.myext" ); to trigger your ISAPI
Extension. If you do not have "Check if file exists" enabled for the
scriptmap, it can be "/scripts/DoesNotActuallyExist.myext" to trigger your
ISAPI Extension.

Finally, the whole pattern of using ISAPI Filter to filter requests and then
changing URL to an ISAPI Extension to read and process entity body has a
better alternative on IIS6. With IIS6, you just need an ISAPI Extension
which uses HSE_REQ_EXEC_URL, and configure this ISAPI Extension as a
wildcard application mapping at the root level. This requires the "Scripts"
executable permission. You will find that the ISAPI Extension automatically
gets called for every URL because it's a wildcard application mapping (so no
need for the ISAPI Filter part), and the ISAPI Extension can directly choose
to ignore the request (just call HSE_REQ_EXEC_URL), or if it is interested
in the URL, it can do something, and then either change the request or pass
it along.

What HSE_REQ_EXEC_URL allows you to do is to execute code of your choice
during the processing of any request -- and still allow the request to be
processed as-is. In other words, a wildcard application mapping can be
triggered on a request to /default.asp to do custom authentication based on
posted entity body, yet STILL allow ASP.DLL to process /default.asp . This
ability is not possible in prior IIS versions.

Based on your recent questions about a filter/extension combo and
SF_NOTIFY_READ_RAW_DATA, I'm going to suggest you look into HSE_REQ_EXEC_URL
configured as a wildcard application mapping.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Kornél Pál" <anonymous@discussions.microsoft.com> wrote in message
news:e45WVtrVEHA.1356@TK2MSFTNGP09.phx.gbl...
I have an ISAPI filter and extension DLL (2 in 1).

The filter uses SF_NOTIFY_PREPROC_HEADERS to decide whether to process the
request using the extension or to leave it is as is.

Then I use SetHeader("URL", "/scripts/filter_extension.dll") to be the
request processed by the extension and SF_NOTIFY_URL_MAP to map
"/scripts/filter_extension.dll" to the physical path of the DLL.

This works but needs "Scripts and Executables" permission on the "/scripts"
directory.
Is there any (other) way to bypass this permission requirement and can be
installed only as a filter?

Sincerely,
Kornél




Re: IIS and HTTP API by Kornél

Kornél
Sun Jun 20 17:20:13 CDT 2004

OK, now everything is clear.
Thank you very much again.

Sincerely,
Kornél



Re: IIS and HTTP API by Kornel

Kornel
Mon Jun 21 04:50:58 CDT 2004

I think you have absolutely right as SF_NOTIFY_READ_RAW_DATA can be used for
a lot of things altough it cannot be used for such protocol level
transformations like SSL.

You can specify a new entity body for the child request in
HSE_EXEC_URL_INFO.pEntity.

But I think the response entity body can only be modified using
SF_NOTIFY_SEND_RAW_DATA and not using HSE_REQ_EXEC_URL. It it true?

And I can't understand why HSE_EXEC_URL_NO_HEADERS cannot suppress headers
sent by WriteClient because as I know HTTP API accepts only structured
headers and SF_NOTIFY_SEND_RESPONSE can modify them as well.

Sincerely,
Kornel



Re: IIS and HTTP API by Jerry

Jerry
Mon Jun 21 23:19:28 CDT 2004


"Yaroslav Govorunov" <slov@helicontech.com> wrote in message
news:O5ndLt3VEHA.2972@TK2MSFTNGP11.phx.gbl...
> Hello, Kornel!
> You wrote on Mon, 21 Jun 2004 11:50:58 +0200:
>
> And what happenes if someone will try to upload a 4GB file on a server? As
> I understand it will require a 4GB RAM to process this request with
> HSE_EXEC_URL_INFO. While with SF_NOTIFY_READ_RAW_DATA we had a stream of
> data wich can be processed on the fly and don't require much RAM usage.
>

Extensions can read the data while it's been uploaded, so you do not need to
hold the whole request in RAM. IIS will only read UploadReadAheadSize (a
metabase property), your extension has to read the rest using ReadClient.
Whether you process the data on the fly or store it in RAM is up to you.

>
> With best regards, Yaroslav Govorunov,
> Helicon Tech
> http://www.helicontech.com

Jerry



Re: IIS and HTTP API by Kornél

Kornél
Tue Jun 22 04:25:07 CDT 2004

> Extensions can read the data while it's been uploaded, so you do not need
to
> hold the whole request in RAM. IIS will only read UploadReadAheadSize (a
> metabase property), your extension has to read the rest using ReadClient.
> Whether you process the data on the fly or store it in RAM is up to you.

It's true for extensions if you read the request entity body, but if you
want to modify it using HSE_REQ_EXEC_URL's HSE_EXEC_URL_INFO.pEntity, you
have to specifiy a single pointer to a buffer with all the entity body you
want to pass to the child request.

Sincerely,
Kornel



Re: IIS and HTTP API by David

David
Tue Jun 22 22:10:04 CDT 2004

The key distinction here is whether you want to view Entity body as a
logical HTTP entity or a stream of data. Depending on how you want to view
the data, it dictates the approach to take.

The basic scenarios are:
1. view/change the first 1K of a 4G upload (the area where most form
parameters are found)
2. view/change some random bytes at offset 3.999999G of a 4G upload.

Prior to IIS6, everyone has to view entity body as a stream of data and obey
HTTP semantics -- which is difficult for many people. HSE_REQ_EXEC_URL is
targetted at scenario #1 and makes it trivial to view/change the entity
body -- incidentally, this happens to neatly address many people's
difficulties with view/changing FORM parameters and removes the need to
understand SF_NOTIFY_READ_RAW_DATA and much HTTP semantics. Now, I'm not
dismissing that #2 is neatly solved by SF_NOTIFY_READ_RAW_DATA since you do
not need to buffer, but both options have their use.

Ultimately, we just want to make it easier for people to do what they want
on IIS by improving its extensibility interfaces.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Kornél Pál" <anonymous@discussions.microsoft.com> wrote in message
news:%23c0vKrDWEHA.2928@tk2msftngp13.phx.gbl...
> Extensions can read the data while it's been uploaded, so you do not need
to
> hold the whole request in RAM. IIS will only read UploadReadAheadSize (a
> metabase property), your extension has to read the rest using ReadClient.
> Whether you process the data on the fly or store it in RAM is up to you.

It's true for extensions if you read the request entity body, but if you
want to modify it using HSE_REQ_EXEC_URL's HSE_EXEC_URL_INFO.pEntity, you
have to specifiy a single pointer to a buffer with all the entity body you
want to pass to the child request.

Sincerely,
Kornel




Re: IIS and HTTP API by Kornél

Kornél
Wed Jun 23 05:22:10 CDT 2004

As I know HSE_REQ_EXEC_URL is not able to modify the response entity body or
headers sent by the child request.

If it's possible please le me know how is it possible.
If it isn't, you should consider to implement it as filters still will be
needed to do this.

And in addition HSE_EXEC_URL_NO_HEADERS isn't able to suppress headers sent
using WriteClient. Is't not a big problem however such headers can be
manipulated by a filter.

But I think ISAPI filter interfaces should be preserved and improved as they
are for low level request and response manipulations contrast with ISAPI
extension that are for request handling. HSE_REQ_EXEC_URL is a good and easy
to use thing for a lot of scenarios but filters could do more.

I would like to ask you to add two new, SF_NOTIFY_READ_ENTITY_BODY and
SF_NOTIFY_SEND_ENTITY_BODY filter notifications as they could have more use
in IIS 6 and later than SF_NOTIFY_READ_RAW_DATA and SF_NOTIFY_SEND_RAW_DATA.

Sincerely,
Kornel



Re: IIS and HTTP API by David

David
Wed Jun 23 06:45:54 CDT 2004

HSE_REQ_EXEC_URL does not control the response. ISAPI Filter is still
necessary to buffer/modify output.

By design, HSE_EXEC_URL_NO_HEADERS cannot control anything sent out via
WriteClient. The former is a logical concept, the latter is a streaming
concept, and since IIS does not parse outgoing data for
performance/scalability reasons (amongst others), there is no way to enforce
a logical concept onto a streaming concept without parsing. This general
issue exists in lots of places in ISAPI APIs, actually.

We did contemplate all three of your requests for IIS6 (allow
HSE_REQ_EXEC_URL to modify response, SF_NOTIFY_READ_ENTITY_BODY, and
SF_NOTIFY_SEND_ENTITY_BODY), but for various reasons, we did not do them.
Frequently, it was because these were more "convenience" than "essential".
It would help if you came up with some concrete pro/con usage cases that
prove "essential" vs "convenience", especially if alternatives exist.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Kornél Pál" <anonymous@discussions.microsoft.com> wrote in message
news:eDhOsvQWEHA.3044@TK2MSFTNGP10.phx.gbl...
As I know HSE_REQ_EXEC_URL is not able to modify the response entity body or
headers sent by the child request.

If it's possible please le me know how is it possible.
If it isn't, you should consider to implement it as filters still will be
needed to do this.

And in addition HSE_EXEC_URL_NO_HEADERS isn't able to suppress headers sent
using WriteClient. Is't not a big problem however such headers can be
manipulated by a filter.

But I think ISAPI filter interfaces should be preserved and improved as they
are for low level request and response manipulations contrast with ISAPI
extension that are for request handling. HSE_REQ_EXEC_URL is a good and easy
to use thing for a lot of scenarios but filters could do more.

I would like to ask you to add two new, SF_NOTIFY_READ_ENTITY_BODY and
SF_NOTIFY_SEND_ENTITY_BODY filter notifications as they could have more use
in IIS 6 and later than SF_NOTIFY_READ_RAW_DATA and SF_NOTIFY_SEND_RAW_DATA.

Sincerely,
Kornel




Re: IIS and HTTP API by Kornél

Kornél
Wed Jun 23 10:48:47 CDT 2004

> By design, HSE_EXEC_URL_NO_HEADERS cannot control anything sent out via
> WriteClient. The former is a logical concept, the latter is a streaming
> concept, and since IIS does not parse outgoing data for
> performance/scalability reasons (amongst others), there is no way to
enforce
> a logical concept onto a streaming concept without parsing. This general
> issue exists in lots of places in ISAPI APIs, actually.
>
> We did contemplate all three of your requests for IIS6 (allow
> HSE_REQ_EXEC_URL to modify response, SF_NOTIFY_READ_ENTITY_BODY, and
> SF_NOTIFY_SEND_ENTITY_BODY), but for various reasons, we did not do them.
> Frequently, it was because these were more "convenience" than "essential".
> It would help if you came up with some concrete pro/con usage cases that
> prove "essential" vs "convenience", especially if alternatives exist.

I think you are wrong in performance reasons, because IIS 6 and IIS 5 as
well has to process the response headers in a structured way to can be used
by SF_NOTIFY_SEND_RESPONSE in a strucured way. And if HTTP API hasn't got an
undocumented way to send headers unstructured IIS 6 has to process response
headers anyway.

If IIS processes response headers it will know where the response entity
body begins and where it ends (or how long it is).
Thus response entity body could be processed by ISAPI filters when
WriteClient or other functions send data to the client.

And of course IIS 6 has to build the raw response for
SF_NOTIFY_SEND_RAW_DATA and then convert back to structured form for HTTP
API if there isn't another undocumented HTTP API feature to filter response
data on worker process basis (not the global one that is used for SSL and
IIS 5.0 isolation mode).

And this is true for both request and response headers and entity body.

And if a filter is registered as cache aware (FilterEnableCache),
ENTITY_BODY notifiacions should not be called so it could benefit from
kernel mode cache.

If I'm wrong please let me know but if I'm right, ENTITY_BODY notifiacions
could produce better performance than RAW_DATA notifications.

I've read in http://support.microsoft.com/default.aspx?scid=kb;en-us;824031
that "HTTP.sys sends the cached response without making a transition to user
mode".
What does this mean?
1. HTTP_DATA_CHUNK with HttpDataChunkFromFragmentCache
In this case the article is not correct as a user mode transition is needed
but not for the entity body.

2. This is an undocumented feautre
I don't say anything in this case.:)

By the way I've got one more question: Is it possible to cache the headers
in HTTP.SYS or only entity body can be cached? Or can HTTP.SYS automatically
response requests with cached data without user mode transition?

Sincerely,
Kornel