Share via


HTTP_FILTER_RAW_DATA

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure contains raw data for an ISAPI filter to process. The ISA Server Web proxy includes a pointer to this structure when it is either reading or sending raw data. 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.

Note

Registering ISAPI filters for raw data notifications (SF_NOTIFY_READ_RAW_DATA and SF_NOTIFY_SEND_RAW_DATA notification types) is deprecated. Applications should write ISAPI extensions to process and generate data that is sent to and from the Web Server.

Syntax

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

Members

  • pvInData
    Pointer to the data buffer.
  • cbInData
    Number of valid data bytes in the buffer pointed to by pvInData.
  • cbInBuffer
    Size of the buffer pointed to by pvInData.
  • dwReserved
    Reserved for future use.

Remarks

If your filter should be notified for events involving reading or sending raw data, it must register to receive one of these notifications:

  • SF_NOTIFY_READ_RAW_DATA
  • SF_NOTIFY_SEND_RAW_DATA
  • SF_NOTIFY_FORWARD_RAW_DATA
  • 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 and 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 indicating that the server closed the connection. At this point, the filter will typically call WriteClient (ISAPI Filters) 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 ISAPI 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

Header httpfilt.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Reference

HttpFilterProc