Microsoft Internet Security and Acceleration Server 2004 SDK

HTTP_FILTER_RAW_DATA

The ISA Server Web proxy includes a pointer to the HTTP_FILTER_RAW_DATA structure when it is either reading or sending raw data. If your filter should be notified for events involving reading or sending raw data, it must register to receive one of these notifications:

For more information about the types of event notifications that are sent to Web filters, see Event Notifications.

typedef struct _HTTP_FILTER_RAW_DATA {
PVOID pvInData;
DWORD cbInData;
DWORD cbInBuffer;
DWORD dwReserved; } HTTP_FILTER_RAW_DATA,
*PHTTP_FILTER_RAW_DATA;

Members

pvInData
Points to the data buffer.
cbInData
The amount of data in the buffer pointed to by pvInData.
cbInBuffer
The size of the buffer pointed to by pvInData.
dwReserved
Reserved for future use.

Remarks

When the server receives raw data, this structure is pointed to by the pvNotification parameter in HttpFilterProc when the notificationType parameter is set to SF_NOTIFY_READ_RAW_DATA or SF_NOTIFY_SEND_RAW_DATA, or in HttpWPXFilterProc when the pvNotification parameter is set to SF_NOTIFY_FORWARD_RAW_DATA or SF_NOTIFY_RECEIVE_RESPONSE_RAW_DATA. The pvInData pointer can be replaced by filters that modify the raw data being sent or received. (If the pointer is replaced, cbInData and cbInBuffer must also be appropriately updated.) The new buffer memory must remain valid until the end of the request. The new buffer memory can remain valid by using AllocMem or AllocMemoryPerRequest, or by using a buffer owned by the filter. In addition, the filter must not attempt to free or otherwise deallocate the old pvInData pointer. Only the owner of the memory block can free the buffer.

If a filter accumulates a response in an SF_NOTIFY_RECEIVE_RESPONSE_RAW_DATA notification without releasing it to the next filter, the filter may not release the data until it receives an SF_NOTIFY_END_OF_REQUEST notification, which indicates that the server closed the connection. At this point, the filter will typically call WriteClient with the accumulated data. However, this will prevent other server-side filters from obtaining the raw response data, and those filters will be skipped. We recommend not accumulating the body of a response without releasing it to the next filter. If you must do so, accumulate the data in an SF_NOTIFY_SEND_RAW_DATA notification rather than an SF_NOTIFY_RECEIVE_RESPONSE_RAW_DATA notification.

Warning  We do not recommend that filters modify the raw data in place. The memory segment may be read-only or the data may be cached directly by an ISAPI extension.

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wpxhttpfilt.h.

See Also

Notification Structures