The
HTTP_RESPONSE_V1 structure contains data associated with an HTTP response.
Do not use HTTP_RESPONSE_V1 directly in your code; use HTTP_RESPONSE instead to ensure that the proper version, based on the operating system the code is compiled under, is used.
Syntax
typedef struct _HTTP_RESPONSE {
ULONG Flags;
HTTP_VERSION Version;
USHORT StatusCode;
USHORT ReasonLength;
PCSTR pReason;
HTTP_RESPONSE_HEADERS Headers;
USHORT EntityChunkCount;
PHTTP_DATA_CHUNK pEntityChunks;
}HTTP_RESPONSE_V1, *PHTTP_RESPONSE_V1;
Members
- Flags
Reserved. Must be zero.
- Version
This member is ignored; the response is always an HTTP/1.1 response.
- StatusCode
Numeric status code that characterizes the result of the HTTP request (for example, 200 signifying "OK" or 404 signifying "Not Found"). For more information and a list of these codes, see Section 10 of
RFC 2616.
If a request is directed to a URL that is reserved but not registered, indicating that the appropriate application to handle it is not running, then the HTTP Server API itself returns a response with status code 400, signifying "Bad Request". This is transparent to the application. A code 400 is preferred here to 503 ("Server not available") because the latter is interpreted by some smart load balancers as an indication that the server is overloaded.
- ReasonLength
Size, in bytes, of the string pointed to by the pReason member not including the terminating null. May be zero.
- pReason
A pointer to a human-readable, null-terminated string of printable characters that characterizes the result of the HTTP request (for example, "OK" or "Not Found").
- Headers
An
HTTP_RESPONSE_HEADERS structure that contains the headers used in this response.
- EntityChunkCount
A number of entity-body data blocks specified in the pEntityChunks array. This number cannot exceed 100. If the response has no entity body, this member must be zero.
- pEntityChunks
An array of
HTTP_DATA_CHUNK structures that together specify all the data blocks that make up the entity body of the response.
Requirements
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Header | Http.h |
See Also
- HTTP Server API Version 2.0 Structures
- HTTP_RESPONSE
- HTTP_RESPONSE_V2
- HTTP_REQUEST
- HttpSendHttpResponse
- HTTP_DATA_CHUNK
- HTTP_RESPONSE_HEADERS
Send comments about this topic to Microsoft
Build date: 7/23/2009