HTTP_DATA_CHUNK structure (http.h)

The HTTP_DATA_CHUNK structure represents an individual block of data either in memory, in a file, or in the HTTP Server API response-fragment cache.

Syntax

typedef struct _HTTP_DATA_CHUNK {
  HTTP_DATA_CHUNK_TYPE DataChunkType;
  union {
    struct {
      PVOID pBuffer;
      ULONG BufferLength;
    } FromMemory;
    struct {
      HTTP_BYTE_RANGE ByteRange;
      HANDLE          FileHandle;
    } FromFileHandle;
    struct {
      USHORT FragmentNameLength;
      PCWSTR pFragmentName;
    } FromFragmentCache;
    struct {
      HTTP_BYTE_RANGE ByteRange;
      PCWSTR          pFragmentName;
    } FromFragmentCacheEx;
    struct {
      USHORT               TrailerCount;
      PHTTP_UNKNOWN_HEADER pTrailers;
    } Trailers;
    struct {
      HTTP_WINHTTP_FAST_FORWARDING_DATA WhFastForwardingData;
    } FromWinHttpFastForwarding;
  };
} HTTP_DATA_CHUNK, *PHTTP_DATA_CHUNK;

Members

DataChunkType

Type of data store. This member can be one of the values from the HTTP_DATA_CHUNK_TYPE enumeration.

FromMemory

FromMemory.pBuffer

Pointer to the starting memory address of the data block.

FromMemory.BufferLength

Length, in bytes, of the data block.

FromFileHandle

FromFileHandle.ByteRange

An HTTP_BYTE_RANGE structure that specifies all or part of the file. To specify the entire file, set the StartingOffset member to zero and the Length member to HTTP_BYTE_RANGE_TO_EOF.

FromFileHandle.FileHandle

Open handle to the file in question.

FromFragmentCache

FromFragmentCache.FragmentNameLength

Length, in bytes, of the fragment name not including the terminating null character.

FromFragmentCache.pFragmentName

Pointer to a string that contains the fragment name assigned when the fragment was added to the response-fragment cache using the HttpAddFragmentToCache function.

FromFragmentCacheEx

FromFragmentCacheEx.ByteRange

An HTTP_BYTE_RANGE structure specifying the byte range in the cached fragment.

FromFragmentCacheEx.pFragmentName

Pointer to a string that contains the fragment name assigned when the fragment was added to the response-fragment cache using the HttpAddFragmentToCache function. The length of the string cannot exceed 65532 bytes.

Note  This string must be NULL terminated.
 

Trailers

Trailers.TrailerCount

Count of the number of HTTP_UNKNOWN_HEADER structures in the array pointed to by pTrailers.

Trailers.pTrailers

Pointer to an array of HTTP_UNKNOWN_HEADER structures containing the trailers.

FromWinHttpFastForwarding

FromWinHttpFastForwarding.WhFastForwardingData

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header http.h

See also

HTTP Server API Version 1.0 Structures

HTTP_REQUEST

HTTP_RESPONSE

HttpAddFragmentToCache

HttpSendResponseEntityBody