http.h (5.2.3790.3959-Windows 5.0) | | http.h (6.0.6001.18000-Windows 6.0) |
| | |
skipping to change at line 21 | | skipping to change at line 21 |
| | |
This header corresponds to the HTTP API specification | | This header corresponds to the HTTP API specification |
| | |
Revision History: | | Revision History: |
| | |
--*/ | | --*/ |
| | |
#ifndef __HTTP_H__ | | #ifndef __HTTP_H__ |
#define __HTTP_H__ | | #define __HTTP_H__ |
| | |
|
| | #pragma once |
| | |
| | #if _WIN32_WINNT >= 0x0501 |
| | |
| | // |
| | // HTTPAPI is available on |
| | // |
| | // a) WinXP SP2 and higher |
| | // b) Windows 2003 and higher |
| | // c) Longhorn and higher. |
| | // |
| | |
#include <winsock2.h> | | #include <winsock2.h> |
#include <ws2tcpip.h> | | #include <ws2tcpip.h> |
| | |
#ifdef __cplusplus | | #ifdef __cplusplus |
extern "C" { | | extern "C" { |
#endif // __cplusplus | | #endif // __cplusplus |
| | |
// | | // |
|
// Flags for HttpInitialize() and HttpTerminate() | | // Flags for HttpInitialize() and HttpTerminate(). |
// | | // |
| | |
// | | // |
// HTTP_INITIALIZE_SERVER - Initializes the HTTP API layer and driver for | | // HTTP_INITIALIZE_SERVER - Initializes the HTTP API layer and driver for |
|
// server applications. | | // applications using server APIs. |
// | | // |
// HTTP_INITIALIZE_CONFIG - Initializes the HTTP API layer and driver for | | // HTTP_INITIALIZE_CONFIG - Initializes the HTTP API layer and driver for |
|
// applications that will modify the HTTP | | // applications using HTTP configuration APIs. |
// configuration. | | // |
// | | // |
// Notes - | | // Notes - |
// | | // |
// 1. These flags can be used in combination. | | // 1. These flags can be used in combination. |
// | | // |
// 2. HttpTerminate() must be called for each call to HttpInitialize() made | | // 2. HttpTerminate() must be called for each call to HttpInitialize() made |
// with each flag set when invoking HttpInitialize. For example, one | | // with each flag set when invoking HttpInitialize. For example, one |
// could make two calls to HttpInitialize() setting HTTP_INITIALIZE_SERVER | | // could make two calls to HttpInitialize() setting HTTP_INITIALIZE_SERVER |
// the first time and HTTP_INITIALIZE_CONFIG the second time. One call | | // the first time and HTTP_INITIALIZE_CONFIG the second time. One call |
// to HttpTerminate() with both flags set suffices to clean up both | | // to HttpTerminate() with both flags set suffices to clean up both |
// calls to HttpInitialize(). | | // calls to HttpInitialize(). |
// | | // |
| | |
#define HTTP_INITIALIZE_SERVER 0x00000001 | | #define HTTP_INITIALIZE_SERVER 0x00000001 |
#define HTTP_INITIALIZE_CONFIG 0x00000002 | | #define HTTP_INITIALIZE_CONFIG 0x00000002 |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Following section defines the properties supported by the |
| | // server side HTTP API. |
| | // |
| | |
| | typedef enum _HTTP_SERVER_PROPERTY |
| | { |
| | // |
| | // Used for enabling server side authentication. |
| | // |
| | |
| | HttpServerAuthenticationProperty, |
| | |
| | // |
| | // Used for enabling logging. |
| | // |
| | |
| | HttpServerLoggingProperty, |
| | |
| | // |
| | // Used for setting QoS properties. |
| | // |
| | |
| | HttpServerQosProperty, |
| | |
| | // |
| | // Used for configuring timeouts. |
| | // |
| | |
| | HttpServerTimeoutsProperty, |
| | |
| | // |
| | // Used for limiting request queue lengths. |
| | // |
| | |
| | HttpServerQueueLengthProperty, |
| | |
| | // |
| | // Used for manipulating the state. |
| | // |
| | |
| | HttpServerStateProperty, |
| | |
| | // |
| | // Used for modifying the verbosity level of 503 type responses |
| | // generated by server side API. |
| | // |
| | |
| | HttpServer503VerbosityProperty, |
| | |
| | // |
| | // Used for manipulating Url Group to Request Queue association. |
| | // |
| | |
| | HttpServerBindingProperty |
| | |
| | } HTTP_SERVER_PROPERTY, *PHTTP_SERVER_PROPERTY; |
| | |
| | #define HTTP_MAX_SERVER_QUEUE_LENGTH 0x7FFFFFFF |
| | #define HTTP_MIN_SERVER_QUEUE_LENGTH 1 |
| | |
| | // |
| | // Generic property flags. Each structure defining a property info typically |
| | // contain an element of this type. |
| | // |
| | |
| | typedef struct _HTTP_PROPERTY_FLAGS |
| | { |
| | ULONG Present:1; |
| | |
| | } HTTP_PROPERTY_FLAGS, *PHTTP_PROPERTY_FLAGS; |
| | |
| | // |
| | // Enabled state. |
| | // |
| | |
| | typedef enum _HTTP_ENABLED_STATE |
| | { |
| | HttpEnabledStateActive, |
| | HttpEnabledStateInactive, |
| | |
| | } HTTP_ENABLED_STATE, *PHTTP_ENABLED_STATE; |
| | |
| | typedef struct _HTTP_STATE_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | HTTP_ENABLED_STATE State; |
| | |
| | } HTTP_STATE_INFO, *PHTTP_STATE_INFO; |
| | |
| | // |
| | // Defines the verbosity level for a request queue which will be used |
| | // when sending "503 - Service Unavailable" type error responses. Note that |
| | // this setting only affects the error responses generated internally |
| | // by HTTPAPI. |
| | // |
| | |
| | typedef enum _HTTP_503_RESPONSE_VERBOSITY |
| | { |
| | // |
| | // Instead of sending a 503 response, the connection will be reset. |
| | // This is the default behavior. |
| | // |
| | Http503ResponseVerbosityBasic, |
| | |
| | // |
| | // Will send a 503 w/ a generic reason phrase. |
| | // |
| | Http503ResponseVerbosityLimited, |
| | |
| | // |
| | // Will send a 503 w/ a detailed reason phrase. |
| | // |
| | Http503ResponseVerbosityFull |
| | |
| | } HTTP_503_RESPONSE_VERBOSITY, *PHTTP_503_RESPONSE_VERBOSITY; |
| | |
| | // |
| | // Network QoS related. |
| | // |
| | |
| | typedef enum _HTTP_QOS_SETTING_TYPE |
| | { |
| | HttpQosSettingTypeBandwidth, |
| | HttpQosSettingTypeConnectionLimit |
| | |
| | } HTTP_QOS_SETTING_TYPE, *PHTTP_QOS_SETTING_TYPE; |
| | |
| | typedef struct _HTTP_QOS_SETTING_INFO |
| | { |
| | HTTP_QOS_SETTING_TYPE QosType; |
| | PVOID QosSetting; |
| | } HTTP_QOS_SETTING_INFO, *PHTTP_QOS_SETTING_INFO; |
| | |
| | typedef struct _HTTP_CONNECTION_LIMIT_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | ULONG MaxConnections; |
| | |
| | } HTTP_CONNECTION_LIMIT_INFO, *PHTTP_CONNECTION_LIMIT_INFO; |
| | |
| | typedef struct _HTTP_BANDWIDTH_LIMIT_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | ULONG MaxBandwidth; |
| | |
| | } HTTP_BANDWIDTH_LIMIT_INFO, *PHTTP_BANDWIDTH_LIMIT_INFO; |
| | |
| | // |
| | // Bandwidth throttling limit can not be set lower than the following |
| | // number. The value is in bytes/sec. |
| | // |
| | |
| | #define HTTP_MIN_ALLOWED_BANDWIDTH_THROTTLING_RATE ((ULONG)1024) |
| | |
| | // |
| | // Distinguished value for bandwidth, connection limits and logging rollover |
| | // size indicating "no limit". |
| | // |
| | |
| | #define HTTP_LIMIT_INFINITE ((ULONG)-1) |
| | |
| | // |
| | // Timeout information. |
| | // |
| | |
| | // |
| | // For manipulating global timeout settings. |
| | // These timers run when connection does not belong to any application. |
| | // Value zero is not allowed for driver wide timeout settings. |
| | // |
| | |
| | typedef enum _HTTP_SERVICE_CONFIG_TIMEOUT_KEY |
| | { |
| | IdleConnectionTimeout = 0, |
| | HeaderWaitTimeout |
| | |
| | } HTTP_SERVICE_CONFIG_TIMEOUT_KEY, *PHTTP_SERVICE_CONFIG_TIMEOUT_KEY; |
| | |
| | typedef USHORT HTTP_SERVICE_CONFIG_TIMEOUT_PARAM, |
| | *PHTTP_SERVICE_CONFIG_TIMEOUT_PARAM; |
| | |
| | // |
| | // To set a timeout value use the set structure. To query/delete use the key |
| | // directly. When you query a timeout value the output buffer must be exactly |
| | // the sizeof param. |
| | // |
| | |
| | typedef struct _HTTP_SERVICE_CONFIG_TIMEOUT_SET |
| | { |
| | HTTP_SERVICE_CONFIG_TIMEOUT_KEY KeyDesc; |
| | HTTP_SERVICE_CONFIG_TIMEOUT_PARAM ParamDesc; |
| | |
| | } HTTP_SERVICE_CONFIG_TIMEOUT_SET, *PHTTP_SERVICE_CONFIG_TIMEOUT_SET; |
| | |
| | // |
| | // For manipulating application specific timeout settings. |
| | // These timers run when there's a request being processed on a connection |
| | // and HTTPAPI has already associated the request with an application. |
| | // Setting a timeout value to zero will cause HTTPAPI to revert to default. |
| | // |
| | |
| | typedef struct _HTTP_TIMEOUT_LIMIT_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | |
| | // |
| | // Timeouts configured in seconds. |
| | // |
| | |
| | USHORT EntityBody; |
| | USHORT DrainEntityBody; |
| | USHORT RequestQueue; |
| | |
| | // |
| | // Following two timeouts are only enforced after first request on |
| | // connection is routed to the application. These will not manipulate |
| | // the driver wide timeouts. |
| | // |
| | |
| | USHORT IdleConnection; |
| | USHORT HeaderWait; |
| | |
| | // |
| | // Timeouts configured in bytes/second. |
| | // This timer can be turned off by setting it to MAXULONG. |
| | // |
| | |
| | ULONG MinSendRate; |
| | |
| | } HTTP_TIMEOUT_LIMIT_INFO, *PHTTP_TIMEOUT_LIMIT_INFO; |
| | |
| | typedef struct _HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS |
| | { |
| | USHORT DomainNameLength; |
| | PWSTR DomainName; |
| | USHORT RealmLength; |
| | PWSTR Realm; |
| | } HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS, |
| | *PHTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS; |
| | |
| | typedef struct _HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS |
| | { |
| | USHORT RealmLength; |
| | PWSTR Realm; |
| | } HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS, |
| | *PHTTP_SERVER_AUTHENTICATION_BASIC_PARAMS; |
| | |
| | // |
| | // Definitions used for setting server side authentication property. |
| | // |
| | |
| | #define HTTP_AUTH_ENABLE_BASIC (0x00000001) |
| | #define HTTP_AUTH_ENABLE_DIGEST (0x00000002) |
| | #define HTTP_AUTH_ENABLE_NTLM (0x00000004) |
| | #define HTTP_AUTH_ENABLE_NEGOTIATE (0x00000008) |
| | #define HTTP_AUTH_ENABLE_ALL \ |
| | (HTTP_AUTH_ENABLE_BASIC |\ |
| | HTTP_AUTH_ENABLE_DIGEST |\ |
| | HTTP_AUTH_ENABLE_NTLM |\ |
| | HTTP_AUTH_ENABLE_NEGOTIATE) |
| | |
| | C_ASSERT(HTTP_AUTH_ENABLE_NEGOTIATE > HTTP_AUTH_ENABLE_NTLM); |
| | C_ASSERT(HTTP_AUTH_ENABLE_NTLM > HTTP_AUTH_ENABLE_DIGEST); |
| | C_ASSERT(HTTP_AUTH_ENABLE_DIGEST > HTTP_AUTH_ENABLE_BASIC); |
| | |
| | typedef struct _HTTP_SERVER_AUTHENTICATION_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | |
| | ULONG AuthSchemes; |
| | |
| | BOOLEAN ReceiveMutualAuth; |
| | BOOLEAN ReceiveContextHandle; |
| | BOOLEAN DisableNTLMCredentialCaching; |
| | |
| | HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS DigestParams; |
| | |
| | HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS BasicParams; |
| | } HTTP_SERVER_AUTHENTICATION_INFO, *PHTTP_SERVER_AUTHENTICATION_INFO; |
| | |
| | // |
| | // Definitions used for setting logging property. |
| | // |
| | |
| | // |
| | // The known log fields recognized/supported by HTTPAPI. Following fields |
| | // are used for W3C logging. Subset of them are also used for error |
| | // logging. |
| | // |
| | |
| | #define HTTP_LOG_FIELD_DATE 0x00000001 |
| | #define HTTP_LOG_FIELD_TIME 0x00000002 |
| | #define HTTP_LOG_FIELD_CLIENT_IP 0x00000004 |
| | #define HTTP_LOG_FIELD_USER_NAME 0x00000008 |
| | #define HTTP_LOG_FIELD_SITE_NAME 0x00000010 |
| | #define HTTP_LOG_FIELD_COMPUTER_NAME 0x00000020 |
| | #define HTTP_LOG_FIELD_SERVER_IP 0x00000040 |
| | #define HTTP_LOG_FIELD_METHOD 0x00000080 |
| | #define HTTP_LOG_FIELD_URI_STEM 0x00000100 |
| | #define HTTP_LOG_FIELD_URI_QUERY 0x00000200 |
| | #define HTTP_LOG_FIELD_STATUS 0x00000400 |
| | #define HTTP_LOG_FIELD_WIN32_STATUS 0x00000800 |
| | #define HTTP_LOG_FIELD_BYTES_SENT 0x00001000 |
| | #define HTTP_LOG_FIELD_BYTES_RECV 0x00002000 |
| | #define HTTP_LOG_FIELD_TIME_TAKEN 0x00004000 |
| | #define HTTP_LOG_FIELD_SERVER_PORT 0x00008000 |
| | #define HTTP_LOG_FIELD_USER_AGENT 0x00010000 |
| | #define HTTP_LOG_FIELD_COOKIE 0x00020000 |
| | #define HTTP_LOG_FIELD_REFERER 0x00040000 |
| | #define HTTP_LOG_FIELD_VERSION 0x00080000 |
| | #define HTTP_LOG_FIELD_HOST 0x00100000 |
| | #define HTTP_LOG_FIELD_SUB_STATUS 0x00200000 |
| | |
| | // |
| | // Fields that are used only for error logging. |
| | // |
| | |
| | #define HTTP_LOG_FIELD_CLIENT_PORT 0x00400000 |
| | #define HTTP_LOG_FIELD_URI 0x00800000 |
| | #define HTTP_LOG_FIELD_SITE_ID 0x01000000 |
| | #define HTTP_LOG_FIELD_REASON 0x02000000 |
| | #define HTTP_LOG_FIELD_QUEUE_NAME 0x04000000 |
| | |
| | // |
| | // Defines the logging type. |
| | // |
| | |
| | typedef enum _HTTP_LOGGING_TYPE |
| | { |
| | HttpLoggingTypeW3C, |
| | HttpLoggingTypeIIS, |
| | HttpLoggingTypeNCSA, |
| | HttpLoggingTypeRaw |
| | |
| | } HTTP_LOGGING_TYPE, *PHTTP_LOGGING_TYPE; |
| | |
| | // |
| | // Defines the rollover type for log files. |
| | // |
| | |
| | typedef enum _HTTP_LOGGING_ROLLOVER_TYPE |
| | { |
| | HttpLoggingRolloverSize, |
| | HttpLoggingRolloverDaily, |
| | HttpLoggingRolloverWeekly, |
| | HttpLoggingRolloverMonthly, |
| | HttpLoggingRolloverHourly |
| | |
| | } HTTP_LOGGING_ROLLOVER_TYPE, *PHTTP_LOGGING_ROLLOVER_TYPE; |
| | |
| | // |
| | // Log file rollover size can not be set lower than the following |
| | // limit. The value is in bytes. |
| | // |
| | |
| | #define HTTP_MIN_ALLOWED_LOG_FILE_ROLLOVER_SIZE ((ULONG)(1 * 1024 * 1024)) |
| | |
| | // |
| | // Logging option flags. When used in the logging configuration alters |
| | // some default logging behaviour. |
| | // |
| | // HTTP_LOGGING_FLAG_LOCAL_TIME_ROLLOVER - This flag is used to change |
| | // the log file rollover to happen by local time based. By default |
| | // log file rollovers happen by GMT time. |
| | // |
| | // HTTP_LOGGING_FLAG_USE_UTF8_CONVERSION - When set the unicode fields |
| | // will be converted to UTF8 multibytes when writting to the log |
| | // files. When this flag is not present, the local code page |
| | // conversion happens. |
| | // |
| | // HTTP_LOGGING_FLAG_LOG_ERRORS_ONLY - |
| | // HTTP_LOGGING_FLAG_LOG_SUCCESS_ONLY - These two flags are used to |
| | // to do selective logging. If neither of them are present both |
| | // types of requests will be logged. Only one these flags can be |
| | // set at a time. They are mutually exclusive. |
| | // |
| | |
| | #define HTTP_LOGGING_FLAG_LOCAL_TIME_ROLLOVER (0x00000001) |
| | #define HTTP_LOGGING_FLAG_USE_UTF8_CONVERSION (0x00000002) |
| | #define HTTP_LOGGING_FLAG_LOG_ERRORS_ONLY (0x00000004) |
| | #define HTTP_LOGGING_FLAG_LOG_SUCCESS_ONLY (0x00000008) |
| | |
| | // |
| | // Configuration structure used for setting the logging property. |
| | // |
| | |
| | typedef struct _HTTP_LOGGING_INFO |
| | { |
| | // |
| | // Specifies whether this property exists or not. |
| | // |
| | |
| | HTTP_PROPERTY_FLAGS Flags; |
| | |
| | // |
| | // Optional logging flags. |
| | // |
| | |
| | ULONG LoggingFlags; |
| | |
| | // |
| | // Optional informatonal software directive string for W3C type logging. Not |
| | // used for other types of logging. If nothing is provided here HTTPAPI will |
| | // log a default string. Any arbitrary string could be used here to identify |
| | // the application. Length cannot be greater than MAX_PATH. Lenght is in |
| | // bytes. |
| | // |
| | |
| | PCWSTR SoftwareName; |
| | USHORT SoftwareNameLength; |
| | |
| | // |
| | // Log file directory must be a fully qualified path. |
| | // Length must be in number of bytes. |
| | // |
| | |
| | USHORT DirectoryNameLength; |
| | PCWSTR DirectoryName; |
| | |
| | // |
| | // Specifies the format for the log files. |
| | // |
| | |
| | HTTP_LOGGING_TYPE Format; |
| | |
| | // |
| | // Bitmask value indicates which fields to be logged |
| | // if the log format is set to W3C. This must be the 'bitwise or' |
| | // of the HTTP_LOG_FIELD_... values. |
| | // |
| | |
| | ULONG Fields; |
| | |
| | // |
| | // Following fields are reserved they must be NULL and zero.. |
| | // |
| | |
| | PVOID pExtFields; |
| | USHORT NumOfExtFields; |
| | |
| | // |
| | // Reserved must be zero. |
| | // |
| | |
| | USHORT MaxRecordSize; |
| | |
| | // |
| | // Defines the rollover type for the log files. |
| | // |
| | |
| | HTTP_LOGGING_ROLLOVER_TYPE RolloverType; |
| | |
| | // |
| | // Indicates the maximum size (in bytes) after which |
| | // the log files should be rolled over. A value of -1 |
| | // (HTTP_LIMIT_INFINITE) indicates an unlimited size. |
| | // This value is discarded if rollover type is not set to |
| | // HttpLoggingRolloverSize. |
| | // |
| | |
| | ULONG RolloverSize; |
| | |
| | // |
| | // Specifies the security descriptor to be applied to |
| | // the log files and the sub-directories. If null we will |
| | // inherit the system default. This security descriptor must |
| | // be self-relative. |
| | // |
| | |
| | PSECURITY_DESCRIPTOR pSecurityDescriptor; |
| | |
| | } HTTP_LOGGING_INFO, *PHTTP_LOGGING_INFO; |
| | |
| | // |
| | // Binding information. |
| | // |
| | |
| | typedef struct _HTTP_BINDING_INFO |
| | { |
| | HTTP_PROPERTY_FLAGS Flags; |
| | HANDLE RequestQueueHandle; |
| | |
| | } HTTP_BINDING_INFO, *PHTTP_BINDING_INFO; |
| | |
| | // |
| | // Definitions for request queue manipulation. |
| | // |
| | // These flags are used with HttpCreateRequestQueue() API. |
| | // |
| | // HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING - To open an existing request |
| | // queue. The request queue name must be supplied. |
| | // |
| | // HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER - Creates the request queue and |
| | // marks that the caller process is not willing to do send/receive (HTTP I/O)on |
| | // the handle directly. |
| | // |
| | |
| | #define HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING (0x00000001) |
| | #define HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER (0x00000002) |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// Flags for HttpReceiveHttpRequest(). | | // Flags for HttpReceiveHttpRequest(). |
// | | // |
// HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY - Specifies that the caller would like | | // HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY - Specifies that the caller would like |
// any available entity body to be copied along with the protocol headers. | | // any available entity body to be copied along with the protocol headers. |
// | | // |
|
| | // HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY - Specifies that the caller would like |
| | // all of the entity bodies to be copied along with the protocol headers. |
| | // |
| | |
#define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY 0x00000001 | | #define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY 0x00000001 |
|
| | #define HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY 0x00000002 |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Flags for HttpReceiveRequestEntityBody(). |
| | // |
| | // HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER - Specifies that the |
| | // caller would like the buffer to get filled up with entity bodies unless |
| | // there are no more entity bodies to be copied. |
| | // |
| | |
| | #define HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER 0x00000001 |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// Flags for HttpSendHttpResponse() and HttpSendResponseEntityBody(). | | // Flags for HttpSendHttpResponse() and HttpSendResponseEntityBody(). |
// | | // |
// HTTP_SEND_RESPONSE_FLAG_DISCONNECT - Specifies that the network connection | | // HTTP_SEND_RESPONSE_FLAG_DISCONNECT - Specifies that the network connection |
// should be disconnected immediately after sending the response, overriding | | // should be disconnected immediately after sending the response, overriding |
// the HTTP protocol's persistent connection features, such as | | // the HTTP protocol's persistent connection features, such as |
// "Connection: keep-alive". | | // "Connection: keep-alive". |
// | | // |
// HTTP_SEND_RESPONSE_FLAG_MORE_DATA - Specifies that additional entity body | | // HTTP_SEND_RESPONSE_FLAG_MORE_DATA - Specifies that additional entity body |
// data will be sent by the caller. | | // data will be sent by the caller. |
// | | // |
// HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA - Specifies that a caller wants the | | // HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA - Specifies that a caller wants the |
|
// response to complete as soon as possible at the cost by buffering partial | | // response to complete as soon as possible at the cost of buffering partial |
// or the entire response. | | // or the entire response. |
// | | // |
|
| | // HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING - Specifies that a caller wants to |
| | // enable the TCP nagling algorithm for this particular send. |
| | // |
| | |
#define HTTP_SEND_RESPONSE_FLAG_DISCONNECT 0x00000001 | | #define HTTP_SEND_RESPONSE_FLAG_DISCONNECT 0x00000001 |
#define HTTP_SEND_RESPONSE_FLAG_MORE_DATA 0x00000002 | | #define HTTP_SEND_RESPONSE_FLAG_MORE_DATA 0x00000002 |
#define HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA 0x00000004 | | #define HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA 0x00000004 |
|
| | #define HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING 0x00000008 |
| | |
// | | // |
// Flags for HttpFlushResponseCache(). | | // Flags for HttpFlushResponseCache(). |
// | | // |
// HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE - Flushes the specified URL and all | | // HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE - Flushes the specified URL and all |
// hierarchally-related sub-URLs from the response or fragment cache. | | // hierarchally-related sub-URLs from the response or fragment cache. |
// | | // |
| | |
#define HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE 0x00000001 | | #define HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE 0x00000001 |
| | |
// | | // |
|
// Opaque identifiers for various kernel objects. | | // Opaque identifiers for various HTTPAPI objects. |
// | | // |
| | |
typedef ULONGLONG HTTP_OPAQUE_ID, *PHTTP_OPAQUE_ID; | | typedef ULONGLONG HTTP_OPAQUE_ID, *PHTTP_OPAQUE_ID; |
| | |
typedef HTTP_OPAQUE_ID HTTP_REQUEST_ID, *PHTTP_REQUEST_ID; | | typedef HTTP_OPAQUE_ID HTTP_REQUEST_ID, *PHTTP_REQUEST_ID; |
typedef HTTP_OPAQUE_ID HTTP_CONNECTION_ID, *PHTTP_CONNECTION_ID; | | typedef HTTP_OPAQUE_ID HTTP_CONNECTION_ID, *PHTTP_CONNECTION_ID; |
typedef HTTP_OPAQUE_ID HTTP_RAW_CONNECTION_ID, *PHTTP_RAW_CONNECTION_ID; | | typedef HTTP_OPAQUE_ID HTTP_RAW_CONNECTION_ID, *PHTTP_RAW_CONNECTION_ID; |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | typedef HTTP_OPAQUE_ID HTTP_URL_GROUP_ID, *PHTTP_URL_GROUP_ID; |
| | typedef HTTP_OPAQUE_ID HTTP_SERVER_SESSION_ID, *PHTTP_SERVER_SESSION_ID; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Macros for opaque identifier manipulations. |
| | // |
| | |
#define HTTP_NULL_ID (0ui64) | | #define HTTP_NULL_ID (0ui64) |
#define HTTP_IS_NULL_ID(pid) (HTTP_NULL_ID == *(pid)) | | #define HTTP_IS_NULL_ID(pid) (HTTP_NULL_ID == *(pid)) |
#define HTTP_SET_NULL_ID(pid) (*(pid) = HTTP_NULL_ID) | | #define HTTP_SET_NULL_ID(pid) (*(pid) = HTTP_NULL_ID) |
| | |
// | | // |
// This structure defines a file byte range. | | // This structure defines a file byte range. |
// | | // |
// If the Length field is HTTP_BYTE_RANGE_TO_EOF then the remainder of the | | // If the Length field is HTTP_BYTE_RANGE_TO_EOF then the remainder of the |
// file (everything after StartingOffset) is sent. | | // file (everything after StartingOffset) is sent. |
// | | // |
| | |
skipping to change at line 310 | | skipping to change at line 860 |
| | |
typedef struct _HTTP_UNKNOWN_HEADER | | typedef struct _HTTP_UNKNOWN_HEADER |
{ | | { |
USHORT NameLength; // in bytes not including the NUL | | USHORT NameLength; // in bytes not including the NUL |
USHORT RawValueLength; // in bytes not including the NUL | | USHORT RawValueLength; // in bytes not including the NUL |
PCSTR pName; // The header name (minus the ':' character) | | PCSTR pName; // The header name (minus the ':' character) |
PCSTR pRawValue; // The header value | | PCSTR pRawValue; // The header value |
| | |
} HTTP_UNKNOWN_HEADER, *PHTTP_UNKNOWN_HEADER; | | } HTTP_UNKNOWN_HEADER, *PHTTP_UNKNOWN_HEADER; |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Log fields data structure is used for logging a request. This structure must |
| | // be provided along with an HttpSendHttpResponse or HttpSendResponseEntityBody |
| | // call that concludes the send. |
| | // |
| | |
| | // Base structure is for future versioning. |
| | |
| | typedef enum _HTTP_LOG_DATA_TYPE |
| | { |
| | HttpLogDataTypeFields = 0 |
| | |
| | } HTTP_LOG_DATA_TYPE, *PHTTP_LOG_DATA_TYPE; |
| | |
| | // should we DECLSPEC_ALIGN(4 or 8) == DECLSPEC_POINTERALIGN? |
| | typedef struct _HTTP_LOG_DATA |
| | { |
| | HTTP_LOG_DATA_TYPE Type; |
| | |
| | } HTTP_LOG_DATA, *PHTTP_LOG_DATA; |
| | |
| | // Current log fields data structure for of type HttpLogDataTypeFields. |
| | |
| | typedef struct _HTTP_LOG_FIELDS_DATA |
| | { |
| | HTTP_LOG_DATA Base; |
| | |
| | USHORT UserNameLength; |
| | USHORT UriStemLength; |
| | USHORT ClientIpLength; |
| | USHORT ServerNameLength; |
| | USHORT ServiceNameLength; |
| | USHORT ServerIpLength; |
| | USHORT MethodLength; |
| | USHORT UriQueryLength; |
| | USHORT HostLength; |
| | USHORT UserAgentLength; |
| | USHORT CookieLength; |
| | USHORT ReferrerLength; |
| | |
| | PWCHAR UserName; |
| | PWCHAR UriStem; |
| | PCHAR ClientIp; |
| | PCHAR ServerName; |
| | PCHAR ServiceName; |
| | PCHAR ServerIp; |
| | PCHAR Method; |
| | PCHAR UriQuery; |
| | PCHAR Host; |
| | PCHAR UserAgent; |
| | PCHAR Cookie; |
| | PCHAR Referrer; |
| | |
| | USHORT ServerPort; |
| | USHORT ProtocolStatus; |
| | |
| | ULONG Win32Status; |
| | |
| | HTTP_VERB MethodNum; |
| | |
| | USHORT SubStatus; |
| | |
| | } HTTP_LOG_FIELDS_DATA, *PHTTP_LOG_FIELDS_DATA; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// This enum defines a data source for a particular chunk of data. | | // This enum defines a data source for a particular chunk of data. |
// | | // |
| | |
typedef enum _HTTP_DATA_CHUNK_TYPE | | typedef enum _HTTP_DATA_CHUNK_TYPE |
{ | | { |
HttpDataChunkFromMemory, | | HttpDataChunkFromMemory, |
HttpDataChunkFromFileHandle, | | HttpDataChunkFromFileHandle, |
HttpDataChunkFromFragmentCache, | | HttpDataChunkFromFragmentCache, |
|
| | HttpDataChunkFromFragmentCacheEx, |
| | |
HttpDataChunkMaximum | | HttpDataChunkMaximum |
| | |
} HTTP_DATA_CHUNK_TYPE, *PHTTP_DATA_CHUNK_TYPE; | | } HTTP_DATA_CHUNK_TYPE, *PHTTP_DATA_CHUNK_TYPE; |
| | |
// | | // |
// This structure describes an individual data chunk. | | // This structure describes an individual data chunk. |
// | | // |
| | |
typedef struct _HTTP_DATA_CHUNK | | typedef struct _HTTP_DATA_CHUNK |
| | |
skipping to change at line 375 | | skipping to change at line 994 |
// From-fragment cache data chunk. | | // From-fragment cache data chunk. |
// | | // |
| | |
struct | | struct |
{ | | { |
USHORT FragmentNameLength; // in bytes not including the NUL | | USHORT FragmentNameLength; // in bytes not including the NUL |
PCWSTR pFragmentName; | | PCWSTR pFragmentName; |
| | |
} FromFragmentCache; | | } FromFragmentCache; |
| | |
|
| | // |
| | // From-fragment cache data chunk that specifies a byte range. |
| | // |
| | |
| | struct |
| | { |
| | HTTP_BYTE_RANGE ByteRange; |
| | PCWSTR pFragmentName; // NULL-terminated string |
| | |
| | } FromFragmentCacheEx; |
| | |
}; | | }; |
| | |
} HTTP_DATA_CHUNK, *PHTTP_DATA_CHUNK; | | } HTTP_DATA_CHUNK, *PHTTP_DATA_CHUNK; |
| | |
// | | // |
|
| | // HTTP API doesn't support 16 bit applications. |
| | // Neither WIN32 nor _WIN64 was defined. |
| | // |
| | |
| | C_ASSERT(TYPE_ALIGNMENT(HTTP_DATA_CHUNK) == sizeof(ULONGLONG)); |
| | |
| | // |
// Structure defining format of request headers. | | // Structure defining format of request headers. |
// | | // |
| | |
typedef struct _HTTP_REQUEST_HEADERS | | typedef struct _HTTP_REQUEST_HEADERS |
{ | | { |
// | | // |
// The array of unknown HTTP headers and the number of | | // The array of unknown HTTP headers and the number of |
// entries in the array. | | // entries in the array. |
// | | // |
| | |
| | |
skipping to change at line 474 | | skipping to change at line 1111 |
USHORT QueryStringLength; // in bytes (no NUL) | | USHORT QueryStringLength; // in bytes (no NUL) |
| | |
PCWSTR pFullUrl; // points to "http://hostname:port/abs/.../path?query" | | PCWSTR pFullUrl; // points to "http://hostname:port/abs/.../path?query" |
PCWSTR pHost; // points to the first char in the hostname | | PCWSTR pHost; // points to the first char in the hostname |
PCWSTR pAbsPath; // Points to the 3rd '/' char | | PCWSTR pAbsPath; // Points to the 3rd '/' char |
PCWSTR pQueryString; // Points to the 1st '?' char or NULL | | PCWSTR pQueryString; // Points to the 1st '?' char or NULL |
| | |
} HTTP_COOKED_URL, *PHTTP_COOKED_URL; | | } HTTP_COOKED_URL, *PHTTP_COOKED_URL; |
| | |
// | | // |
|
// An opaque context for URLs | | // An opaque context for URL manipulation. |
// | | // |
| | |
typedef ULONGLONG HTTP_URL_CONTEXT; | | typedef ULONGLONG HTTP_URL_CONTEXT; |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Optional flags for URL manipulation functions. |
| | // |
| | // HTTP_URL_FLAG_REMOVE_ALL : When this flag is used |
| | // when removing a Url from a url group, regardless of |
| | // the passed URL, all of the Urls from the url group |
| | // will be removed. |
| | // |
| | |
| | #define HTTP_URL_FLAG_REMOVE_ALL 0x00000001 |
| | |
| | // |
| | // Request Authentication related. |
| | // |
| | |
| | typedef enum _HTTP_AUTH_STATUS |
| | { |
| | HttpAuthStatusSuccess, |
| | HttpAuthStatusNotAuthenticated, |
| | HttpAuthStatusFailure |
| | |
| | } HTTP_AUTH_STATUS, *PHTTP_AUTH_STATUS; |
| | |
| | typedef enum _HTTP_REQUEST_AUTH_TYPE |
| | { |
| | HttpRequestAuthTypeNone = 0, |
| | HttpRequestAuthTypeBasic, |
| | HttpRequestAuthTypeDigest, |
| | HttpRequestAuthTypeNTLM, |
| | HttpRequestAuthTypeNegotiate |
| | |
| | } HTTP_REQUEST_AUTH_TYPE, *PHTTP_REQUEST_AUTH_TYPE; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// SSL Client certificate information. | | // SSL Client certificate information. |
// | | // |
| | |
typedef struct _HTTP_SSL_CLIENT_CERT_INFO | | typedef struct _HTTP_SSL_CLIENT_CERT_INFO |
{ | | { |
ULONG CertFlags; | | ULONG CertFlags; |
ULONG CertEncodedSize; | | ULONG CertEncodedSize; |
PUCHAR pCertEncoded; | | PUCHAR pCertEncoded; |
HANDLE Token; | | HANDLE Token; |
| | |
skipping to change at line 512 | | skipping to change at line 1186 |
ULONG ServerCertSubjectSize; | | ULONG ServerCertSubjectSize; |
| | |
PCSTR pServerCertIssuer; | | PCSTR pServerCertIssuer; |
PCSTR pServerCertSubject; | | PCSTR pServerCertSubject; |
| | |
PHTTP_SSL_CLIENT_CERT_INFO pClientCertInfo; | | PHTTP_SSL_CLIENT_CERT_INFO pClientCertInfo; |
ULONG SslClientCertNegotiated; | | ULONG SslClientCertNegotiated; |
| | |
} HTTP_SSL_INFO, *PHTTP_SSL_INFO; | | } HTTP_SSL_INFO, *PHTTP_SSL_INFO; |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
|
// The structure of an HTTP request. | | // Generic request information type. |
// | | // |
| | |
|
typedef struct _HTTP_REQUEST | | typedef enum _HTTP_REQUEST_INFO_TYPE |
| | { |
| | HttpRequestInfoTypeAuth |
| | |
| | } HTTP_REQUEST_INFO_TYPE, *PHTTP_REQUEST_INFO_TYPE; |
| | |
| | typedef struct _HTTP_REQUEST_INFO |
| | { |
| | HTTP_REQUEST_INFO_TYPE InfoType; |
| | ULONG InfoLength; |
| | PVOID pInfo; |
| | |
| | } HTTP_REQUEST_INFO, *PHTTP_REQUEST_INFO; |
| | |
| | #ifndef __SECSTATUS_DEFINED__ |
| | typedef LONG SECURITY_STATUS; |
| | #define __SECSTATUS_DEFINED__ |
| | #endif // __SECSTATUS_DEFINED__ |
| | |
| | // |
| | // Authentication request info structure |
| | // |
| | |
| | #define HTTP_REQUEST_AUTH_FLAG_TOKEN_FOR_CACHED_CRED (0x00000001) |
| | |
| | typedef struct _HTTP_REQUEST_AUTH_INFO |
| | { |
| | HTTP_AUTH_STATUS AuthStatus; |
| | SECURITY_STATUS SecStatus; |
| | |
| | ULONG Flags; |
| | |
| | HTTP_REQUEST_AUTH_TYPE AuthType; |
| | |
| | HANDLE AccessToken; |
| | ULONG ContextAttributes; |
| | |
| | // |
| | // Optional serialized context. |
| | // |
| | |
| | ULONG PackedContextLength; |
| | ULONG PackedContextType; |
| | PVOID PackedContext; |
| | |
| | // |
| | // Optional mutual authentication data and its length in bytes. |
| | // |
| | |
| | ULONG MutualAuthDataLength; |
| | PCHAR pMutualAuthData; |
| | |
| | // |
| | // For SSPI based schemes the package name is returned. Length does |
| | // not include the terminating null and it is in bytes. |
| | // |
| | |
| | USHORT PackageNameLength; |
| | PWSTR pPackageName; |
| | |
| | } HTTP_REQUEST_AUTH_INFO, *PHTTP_REQUEST_AUTH_INFO; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // The structure of an HTTP request for downlevel OS |
| | // |
| | |
| | typedef struct _HTTP_REQUEST_V1 |
{ | | { |
// | | // |
// Request flags (see HTTP_REQUEST_FLAG_* definitions below). | | // Request flags (see HTTP_REQUEST_FLAG_* definitions below). |
// | | // |
| | |
ULONG Flags; | | ULONG Flags; |
| | |
// | | // |
// An opaque request identifier. These values are used by the driver | | // An opaque request identifier. These values are used by the driver |
// to correlate outgoing responses with incoming requests. | | // to correlate outgoing responses with incoming requests. |
| | |
skipping to change at line 614 | | skipping to change at line 1358 |
USHORT EntityChunkCount; | | USHORT EntityChunkCount; |
PHTTP_DATA_CHUNK pEntityChunks; | | PHTTP_DATA_CHUNK pEntityChunks; |
| | |
// | | // |
// SSL connection information. | | // SSL connection information. |
// | | // |
| | |
HTTP_RAW_CONNECTION_ID RawConnectionId; | | HTTP_RAW_CONNECTION_ID RawConnectionId; |
PHTTP_SSL_INFO pSslInfo; | | PHTTP_SSL_INFO pSslInfo; |
| | |
|
} HTTP_REQUEST, *PHTTP_REQUEST; | | } HTTP_REQUEST_V1, *PHTTP_REQUEST_V1; |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // Longhorn |
| | |
| | // |
| | // Version 2.0 members are defined here |
| | // N.B. One must define V2 elements in two places :( |
| | // This is due to the fact that C++ doesn't allow anonymous |
| | // structure declarations and one must use structure |
| | // inheritance instead. |
| | // |
| | |
| | #ifdef __cplusplus |
| | |
| | typedef struct _HTTP_REQUEST_V2 : _HTTP_REQUEST_V1 |
| | { |
| | // |
| | // Version 1.0 members are inherited |
| | // Version 2.0 members are declared below |
| | // |
| | |
| | // |
| | // Additional Request Informations. |
| | // |
| | |
| | USHORT RequestInfoCount; |
| | PHTTP_REQUEST_INFO pRequestInfo; |
| | } HTTP_REQUEST_V2, *PHTTP_REQUEST_V2; |
| | |
| | #else // __cplusplus |
| | |
| | typedef struct _HTTP_REQUEST_V2 |
| | { |
| | struct _HTTP_REQUEST_V1; // Anonymous structure |
| | |
| | // |
| | // Version 2.0 members are declared below |
| | // |
| | |
| | // |
| | // Additional Request Informations. |
| | // |
| | |
| | USHORT RequestInfoCount; |
| | PHTTP_REQUEST_INFO pRequestInfo; |
| | } HTTP_REQUEST_V2, *PHTTP_REQUEST_V2; |
| | |
| | #endif // __cplusplus |
| | |
| | typedef HTTP_REQUEST_V2 HTTP_REQUEST; |
| | |
| | #else // _WIN32_WINNT >= 0x0600 |
| | |
| | typedef HTTP_REQUEST_V1 HTTP_REQUEST; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | typedef HTTP_REQUEST * PHTTP_REQUEST; |
| | |
// | | // |
// Values for HTTP_REQUEST::Flags. Zero or more of these may be ORed together. | | // Values for HTTP_REQUEST::Flags. Zero or more of these may be ORed together. |
// | | // |
// HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS - there is more entity body | | // HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS - there is more entity body |
// to be read for this request. Otherwise, there is no entity body or | | // to be read for this request. Otherwise, there is no entity body or |
// all of the entity body was copied into pEntityChunks. | | // all of the entity body was copied into pEntityChunks. |
|
| | // HTTP_REQUEST_FLAG_IP_ROUTED - This flag indicates that the request has been |
| | // routed based on host plus ip or ip binding.This is a hint for the application |
| | // to include the local ip while flushing kernel cache entries build for this |
| | // request if any. |
// | | // |
| | |
#define HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS 0x00000001 | | #define HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS 0x00000001 |
|
| | #define HTTP_REQUEST_FLAG_IP_ROUTED 0x00000002 |
| | |
// | | // |
// This structure describes an HTTP response. | | // This structure describes an HTTP response. |
// | | // |
| | |
|
typedef struct _HTTP_RESPONSE | | typedef struct _HTTP_RESPONSE_V1 |
{ | | { |
|
| | // |
| | // Response flags (see HTTP_RESPONSE_FLAG_* definitions below). |
| | // |
| | |
ULONG Flags; | | ULONG Flags; |
| | |
// | | // |
// The raw HTTP protocol version number. | | // The raw HTTP protocol version number. |
// | | // |
| | |
HTTP_VERSION Version; | | HTTP_VERSION Version; |
| | |
// | | // |
// The HTTP status code (e.g., 200). | | // The HTTP status code (e.g., 200). |
| | |
skipping to change at line 667 | | skipping to change at line 1479 |
| | |
HTTP_RESPONSE_HEADERS Headers; | | HTTP_RESPONSE_HEADERS Headers; |
| | |
// | | // |
// pEntityChunks points to an array of EntityChunkCount HTTP_DATA_CHUNKs. | | // pEntityChunks points to an array of EntityChunkCount HTTP_DATA_CHUNKs. |
// | | // |
| | |
USHORT EntityChunkCount; | | USHORT EntityChunkCount; |
PHTTP_DATA_CHUNK pEntityChunks; | | PHTTP_DATA_CHUNK pEntityChunks; |
| | |
|
} HTTP_RESPONSE, *PHTTP_RESPONSE; | | } HTTP_RESPONSE_V1, *PHTTP_RESPONSE_V1; |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // Longhorn |
| | |
| | typedef enum _HTTP_RESPONSE_INFO_TYPE |
| | { |
| | HttpResponseInfoTypeMultipleKnownHeaders |
| | } HTTP_RESPONSE_INFO_TYPE, PHTTP_RESPONSE_INFO_TYPE; |
| | |
| | typedef struct _HTTP_RESPONSE_INFO |
| | { |
| | HTTP_RESPONSE_INFO_TYPE Type; |
| | ULONG Length; |
| | PVOID pInfo; |
| | } HTTP_RESPONSE_INFO, *PHTTP_RESPONSE_INFO; |
| | |
| | #define HTTP_RESPONSE_INFO_FLAGS_PRESERVE_ORDER 0x00000001 |
| | |
| | // |
| | // This structure allows the provision of providing multiple known headers. |
| | // |
| | |
| | typedef struct _HTTP_MULTIPLE_KNOWN_HEADERS |
| | { |
| | // |
| | // Known header id. |
| | // |
| | |
| | HTTP_HEADER_ID HeaderId; |
| | |
| | ULONG Flags; |
| | |
| | // |
| | // Number of headers of the same category. |
| | // |
| | |
| | USHORT KnownHeaderCount; |
| | |
| | // |
| | // Array of known header structures. |
| | // |
| | |
| | PHTTP_KNOWN_HEADER KnownHeaders; |
| | |
| | } HTTP_MULTIPLE_KNOWN_HEADERS, |
| | *PHTTP_MULTIPLE_KNOWN_HEADERS; |
| | |
| | // |
| | // Version 2.0 members are defined here |
| | // N.B. One must define V2 elements in two places :( |
| | // This is due to the fact that C++ doesn't allow anonymous |
| | // structure declarations and one must use structure |
| | // inheritance instead. |
| | // |
| | |
| | #ifdef __cplusplus |
| | |
| | typedef struct _HTTP_RESPONSE_V2 : _HTTP_RESPONSE_V1 |
| | { |
| | // |
| | // Version 1.0 members are inherited |
| | // Version 2.0 members are declared below |
| | // |
| | |
| | USHORT ResponseInfoCount; |
| | PHTTP_RESPONSE_INFO pResponseInfo; |
| | |
| | } HTTP_RESPONSE_V2, *PHTTP_RESPONSE_V2; |
| | |
| | #else // __cplusplus |
| | |
| | typedef struct _HTTP_RESPONSE_V2 |
| | { |
| | struct _HTTP_RESPONSE_V1; |
| | |
| | // |
| | // Version 2.0 members are declared below |
| | // |
| | |
| | USHORT ResponseInfoCount; |
| | PHTTP_RESPONSE_INFO pResponseInfo; |
| | } HTTP_RESPONSE_V2, *PHTTP_RESPONSE_V2; |
| | |
| | #endif // __cplusplus |
| | |
| | typedef HTTP_RESPONSE_V2 HTTP_RESPONSE; |
| | |
| | #else // _WIN32_WINNT >= 0x0600 |
| | |
| | typedef HTTP_RESPONSE_V1 HTTP_RESPONSE; |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | typedef HTTP_RESPONSE *PHTTP_RESPONSE; |
| | |
| | // |
| | // Api Version. This is used to ensure compatibility between applications and |
| | // httpapi.dll and http.sys. |
| | // |
| | // This must not be confused with the HTTP Protocol version. |
| | // |
| | |
| | typedef struct _HTTPAPI_VERSION |
| | { |
| | USHORT HttpApiMajorVersion; |
| | USHORT HttpApiMinorVersion; |
| | |
| | } HTTPAPI_VERSION, *PHTTPAPI_VERSION; |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // Longhorn |
| | |
| | #define HTTPAPI_VERSION_2 { 2, 0 } |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | #define HTTPAPI_VERSION_1 { 1, 0 } |
| | |
| | #define HTTPAPI_EQUAL_VERSION(version, major, minor) \ |
| | ((version).HttpApiMajorVersion == (major) && \ |
| | (version).HttpApiMinorVersion == (minor)) |
| | |
| | #define HTTPAPI_GREATER_VERSION(version, major, minor) \ |
| | ((version).HttpApiMajorVersion > (major) || \ |
| | ((version).HttpApiMajorVersion == (major) && \ |
| | (version).HttpApiMinorVersion > (minor))) |
| | |
| | #define HTTPAPI_LESS_VERSION(version, major, minor) \ |
| | ((version).HttpApiMajorVersion < (major) || \ |
| | ((version).HttpApiMajorVersion == (major) && \ |
| | (version).HttpApiMinorVersion < (minor))) |
| | |
| | #define HTTPAPI_VERSION_GREATER_OR_EQUAL( version, major, minor) \ |
| | (!HTTPAPI_LESS_VERSION(version, major, minor)) |
| | |
// | | // |
// Cache control. | | // Cache control. |
// | | // |
| | |
// | | // |
// This enum defines the available cache policies. | | // This enum defines the available cache policies. |
// | | // |
| | |
typedef enum _HTTP_CACHE_POLICY_TYPE | | typedef enum _HTTP_CACHE_POLICY_TYPE |
| | |
skipping to change at line 708 | | skipping to change at line 1656 |
// | | // |
// Enum that is used with HttpSetServiceConfiguration(), | | // Enum that is used with HttpSetServiceConfiguration(), |
// HttpQueryServiceConfiguration(), and HttpDeleteServiceConfiguration() APIs. | | // HttpQueryServiceConfiguration(), and HttpDeleteServiceConfiguration() APIs. |
// | | // |
| | |
typedef enum _HTTP_SERVICE_CONFIG_ID | | typedef enum _HTTP_SERVICE_CONFIG_ID |
{ | | { |
HttpServiceConfigIPListenList, // Set, Query & Delete. | | HttpServiceConfigIPListenList, // Set, Query & Delete. |
HttpServiceConfigSSLCertInfo, // Set, Query & Delete. | | HttpServiceConfigSSLCertInfo, // Set, Query & Delete. |
HttpServiceConfigUrlAclInfo, // Set, Query & Delete. | | HttpServiceConfigUrlAclInfo, // Set, Query & Delete. |
|
| | HttpServiceConfigTimeout, // Set, Query & Delete. |
HttpServiceConfigMax | | HttpServiceConfigMax |
| | |
} HTTP_SERVICE_CONFIG_ID, *PHTTP_SERVICE_CONFIG_ID; | | } HTTP_SERVICE_CONFIG_ID, *PHTTP_SERVICE_CONFIG_ID; |
| | |
// | | // |
// Generic Query enum that can be used with HttpQueryServiceConfiguration() | | // Generic Query enum that can be used with HttpQueryServiceConfiguration() |
// | | // |
| | |
typedef enum _HTTP_SERVICE_CONFIG_QUERY_TYPE | | typedef enum _HTTP_SERVICE_CONFIG_QUERY_TYPE |
{ | | { |
| | |
skipping to change at line 802 | | skipping to change at line 1751 |
// | | // |
// Default Flags - see HTTP_SERVICE_CONFIG_SSL_FLAG* below. | | // Default Flags - see HTTP_SERVICE_CONFIG_SSL_FLAG* below. |
// | | // |
| | |
DWORD DefaultFlags; | | DWORD DefaultFlags; |
| | |
} HTTP_SERVICE_CONFIG_SSL_PARAM, *PHTTP_SERVICE_CONFIG_SSL_PARAM; | | } HTTP_SERVICE_CONFIG_SSL_PARAM, *PHTTP_SERVICE_CONFIG_SSL_PARAM; |
| | |
#define HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER 0x00000001 | | #define HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER 0x00000001 |
#define HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT 0x00000002 | | #define HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT 0x00000002 |
|
| | #if _WIN32_WINNT < 0x0600 |
#define HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER 0x00000004 | | #define HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER 0x00000004 |
|
| | #endif // _WIN32_WINNT < 0x0600 |
| | |
// | | // |
// This data structure is used by HttpSetServiceConfiguration() for the | | // This data structure is used by HttpSetServiceConfiguration() for the |
// config ID HttpServiceConfigSSLCertInfo. It's used to add a new record | | // config ID HttpServiceConfigSSLCertInfo. It's used to add a new record |
// to the SSL store. | | // to the SSL store. |
// | | // |
| | |
typedef struct _HTTP_SERVICE_CONFIG_SSL_SET | | typedef struct _HTTP_SERVICE_CONFIG_SSL_SET |
{ | | { |
HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc; | | HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc; |
| | |
skipping to change at line 934 | | skipping to change at line 1885 |
// | | // |
| | |
#if !defined(HTTPAPI_LINKAGE) | | #if !defined(HTTPAPI_LINKAGE) |
#define HTTPAPI_LINKAGE DECLSPEC_IMPORT | | #define HTTPAPI_LINKAGE DECLSPEC_IMPORT |
#endif // !HTTPAPI_LINKAGE | | #endif // !HTTPAPI_LINKAGE |
| | |
// | | // |
// Initialize/Terminate APIs. | | // Initialize/Terminate APIs. |
// | | // |
| | |
|
// | | |
// Version number to be passed to HttpInitialize(). This is used to ensure | | |
// compatibility between applications and httpapi.dll and http.sys. | | |
// | | |
// This must not be confused with the HTTP Protocol version. | | |
// | | |
| | |
typedef struct _HTTPAPI_VERSION | | |
{ | | |
USHORT HttpApiMajorVersion; | | |
USHORT HttpApiMinorVersion; | | |
| | |
} HTTPAPI_VERSION, *PHTTPAPI_VERSION; | | |
| | |
#define HTTPAPI_VERSION_1 {1, 0} | | |
| | |
// NOTE: MUST be called once before all other APIs | | // NOTE: MUST be called once before all other APIs |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpInitialize( | | HttpInitialize( |
|
IN HTTPAPI_VERSION Version, | | IN HTTPAPI_VERSION Version, |
IN ULONG Flags, | | IN ULONG Flags, |
IN OUT PVOID pReserved // must be NULL | | __reserved IN OUT PVOID pReserved |
); | | ); |
| | |
// NOTE: MUST be called after final API call returns. | | // NOTE: MUST be called after final API call returns. |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpTerminate( | | HttpTerminate( |
|
IN ULONG Flags, | | IN ULONG Flags, |
IN OUT PVOID pReserved // must be NULL | | __reserved IN OUT PVOID pReserved |
); | | ); |
| | |
// | | // |
|
// HTTP Request Queue handle | | // HTTP Request Queue manipulation APIs. |
| | // |
| | // This API is maintained for backward competibility for the first |
| | // version of the HTTPAPI and should not be used. Instead the new |
| | // HttpCreateRequestQueue() API must be used. |
| | // |
| | // Use CloseHandle() to release the handles returned by |
| | // HttpCreateHttpHandle() API. |
// | | // |
| | |
|
// NOTE: call CloseHandle() to release. | | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpCreateHttpHandle( | | HttpCreateHttpHandle( |
OUT PHANDLE pReqQueueHandle, | | OUT PHANDLE pReqQueueHandle, |
|
IN ULONG Options // Reserved must be 0 | | __reserved IN ULONG Reserved |
); | | ); |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Extended Request Queue manipulation APIs. |
| | // |
| | // Use HttpCloseRequestQueue() API to close the handles |
| | // created by the HttpCreateRequestQueue API. |
| | // |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCreateRequestQueue( |
| | IN HTTPAPI_VERSION Version, |
| | IN PCWSTR pName OPTIONAL, |
| | IN PSECURITY_ATTRIBUTES pSecurityAttributes OPTIONAL, |
| | IN ULONG Flags OPTIONAL, |
| | OUT PHANDLE pReqQueueHandle |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCloseRequestQueue( |
| | IN HANDLE ReqQueueHandle |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpSetRequestQueueProperty( |
| | IN HANDLE Handle, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __in_bcount(PropertyInformationLength) IN PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength, |
| | __reserved IN ULONG Reserved, |
| | __reserved IN PVOID pReserved |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpQueryRequestQueueProperty( |
| | IN HANDLE Handle, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __out_bcount_part(PropertyInformationLength, *pReturnLength) |
| | OUT PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength, |
| | __reserved IN ULONG Reserved, |
| | __out_opt OUT PULONG pReturnLength OPTIONAL, |
| | __reserved IN PVOID pReserved |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpShutdownRequestQueue( |
| | IN HANDLE ReqQueueHandle |
| | ); |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// SSL APIs. | | // SSL APIs. |
// | | // |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpReceiveClientCertificate( | | HttpReceiveClientCertificate( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_CONNECTION_ID ConnectionId, | | IN HTTP_CONNECTION_ID ConnectionId, |
IN ULONG Flags, | | IN ULONG Flags, |
| | __out_bcount_part(SslClientCertInfoSize, *pBytesReceived) |
OUT PHTTP_SSL_CLIENT_CERT_INFO pSslClientCertInfo, | | OUT PHTTP_SSL_CLIENT_CERT_INFO pSslClientCertInfo, |
|
IN ULONG SslClientCertInfoSize, | | IN ULONG SslClientCertInfoSize, |
OUT PULONG pBytesReceived OPTIONAL, | | __out_opt OUT PULONG pBytesReceived OPTIONAL, |
IN LPOVERLAPPED pOverlapped | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
|
// URL Configuration APIs. | | // Server Session APIs. |
| | // |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCreateServerSession( |
| | IN HTTPAPI_VERSION Version, |
| | OUT PHTTP_SERVER_SESSION_ID pServerSessionId, |
| | __reserved IN ULONG Reserved |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCloseServerSession( |
| | IN HTTP_SERVER_SESSION_ID ServerSessionId |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpQueryServerSessionProperty( |
| | IN HTTP_SERVER_SESSION_ID ServerSessionId, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __out_bcount_part(PropertyInformationLength, *pReturnLength) |
| | OUT PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength, |
| | __out_opt OUT PULONG pReturnLength OPTIONAL |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpSetServerSessionProperty( |
| | IN HTTP_SERVER_SESSION_ID ServerSessionId, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __in_bcount(PropertyInformationLength) IN PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength |
| | ); |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Url Configuration APIs. Can only be used for V1 request queues. |
// | | // |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpAddUrl( | | HttpAddUrl( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN PCWSTR pUrlPrefix, | | IN PCWSTR pFullyQualifiedUrl, |
IN PVOID pReserved // must be NULL | | __reserved IN PVOID pReserved |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpRemoveUrl( | | HttpRemoveUrl( |
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
|
IN PCWSTR pUrlPrefix | | IN PCWSTR pFullyQualifiedUrl |
| | ); |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | // |
| | // Url Group APIs. |
| | // |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCreateUrlGroup( |
| | IN HTTP_SERVER_SESSION_ID ServerSessionId, |
| | OUT PHTTP_URL_GROUP_ID pUrlGroupId, |
| | __reserved IN ULONG Reserved |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCloseUrlGroup( |
| | IN HTTP_URL_GROUP_ID UrlGroupId |
); | | ); |
| | |
|
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpAddUrlToUrlGroup( |
| | IN HTTP_URL_GROUP_ID UrlGroupId, |
| | IN PCWSTR pFullyQualifiedUrl, |
| | IN HTTP_URL_CONTEXT UrlContext OPTIONAL, |
| | __reserved IN ULONG Reserved |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpRemoveUrlFromUrlGroup( |
| | IN HTTP_URL_GROUP_ID UrlGroupId, |
| | IN PCWSTR pFullyQualifiedUrl, |
| | IN ULONG Flags |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpSetUrlGroupProperty( |
| | IN HTTP_URL_GROUP_ID UrlGroupId, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __in_bcount(PropertyInformationLength) IN PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpQueryUrlGroupProperty( |
| | IN HTTP_URL_GROUP_ID UrlGroupId, |
| | IN HTTP_SERVER_PROPERTY Property, |
| | __out_bcount_part(PropertyInformationLength, *pReturnLength) |
| | OUT PVOID pPropertyInformation, |
| | IN ULONG PropertyInformationLength, |
| | __out_opt OUT PULONG pReturnLength OPTIONAL |
| | ); |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// HTTP Server I/O APIs. | | // HTTP Server I/O APIs. |
// | | // |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpReceiveHttpRequest( | | HttpReceiveHttpRequest( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_REQUEST_ID RequestId, | | IN HTTP_REQUEST_ID RequestId, |
IN ULONG Flags, | | IN ULONG Flags, |
OUT PHTTP_REQUEST pRequestBuffer, | | __out_bcount_part(RequestBufferLength, *pBytesReceived) |
IN ULONG RequestBufferLength, | | OUT PHTTP_REQUEST pRequestBuffer, |
OUT PULONG pBytesReceived OPTIONAL, | | IN ULONG RequestBufferLength, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | __out_opt OUT PULONG pBytesReceived OPTIONAL, |
| | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpReceiveRequestEntityBody( | | HttpReceiveRequestEntityBody( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_REQUEST_ID RequestId, | | IN HTTP_REQUEST_ID RequestId, |
IN ULONG Flags, | | IN ULONG Flags, |
OUT PVOID pBuffer, | | __out_bcount_part(BufferLength, *pBytesReceived) OUT PVOID pBuffer, |
IN ULONG BufferLength, | | IN ULONG BufferLength, |
OUT PULONG pBytesReceived OPTIONAL, | | __out_opt OUT PULONG pBytesReceived OPTIONAL, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpSendHttpResponse( | | HttpSendHttpResponse( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_REQUEST_ID RequestId, | | IN HTTP_REQUEST_ID RequestId, |
IN ULONG Flags, | | IN ULONG Flags, |
IN PHTTP_RESPONSE pHttpResponse, | | IN PHTTP_RESPONSE pHttpResponse, |
IN PVOID pReserved1 OPTIONAL, // must be NULL | | IN PHTTP_CACHE_POLICY pCachePolicy OPTIONAL, |
OUT PULONG pBytesSent OPTIONAL, | | OUT PULONG pBytesSent OPTIONAL, |
OUT PVOID pReserved2 OPTIONAL, // must be NULL | | OUT PVOID pReserved1 OPTIONAL, // must be NULL |
IN ULONG Reserved3 OPTIONAL, // must be 0 | | IN ULONG Reserved2 OPTIONAL, // must be 0 |
IN LPOVERLAPPED pOverlapped OPTIONAL, | | IN LPOVERLAPPED pOverlapped OPTIONAL, |
IN PVOID pReserved4 OPTIONAL // must be NULL | | IN PHTTP_LOG_DATA pLogData OPTIONAL |
); | | ); |
| | |
|
| | #else // _WIN32_WINNT >= 0x0600 |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpSendHttpResponse( |
| | IN HANDLE ReqQueueHandle, |
| | IN HTTP_REQUEST_ID RequestId, |
| | IN ULONG Flags, |
| | IN PHTTP_RESPONSE pHttpResponse, |
| | IN PVOID pReserved1 OPTIONAL, // must be NULL |
| | OUT PULONG pBytesSent OPTIONAL, |
| | OUT PVOID pReserved2 OPTIONAL, // must be NULL |
| | IN ULONG Reserved3 OPTIONAL, // must be 0 |
| | IN LPOVERLAPPED pOverlapped OPTIONAL, |
| | IN PVOID pReserved4 OPTIONAL // must be NULL |
| | ); |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
| | #if _WIN32_WINNT >= 0x0600 |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpSendResponseEntityBody( | | HttpSendResponseEntityBody( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_REQUEST_ID RequestId, | | IN HTTP_REQUEST_ID RequestId, |
IN ULONG Flags, | | IN ULONG Flags, |
IN USHORT EntityChunkCount OPTIONAL, | | IN USHORT EntityChunkCount OPTIONAL, |
IN PHTTP_DATA_CHUNK pEntityChunks OPTIONAL, | | __in_ecount_opt(EntityChunkCount) |
OUT PULONG pBytesSent OPTIONAL, | | IN PHTTP_DATA_CHUNK pEntityChunks OPTIONAL, |
OUT PVOID pReserved1 OPTIONAL, // must be NULL | | OUT PULONG pBytesSent OPTIONAL, |
IN ULONG Reserved2 OPTIONAL, // must be 0 | | OUT PVOID pReserved1 OPTIONAL, // must be NULL |
IN LPOVERLAPPED pOverlapped OPTIONAL, | | IN ULONG Reserved2 OPTIONAL, // must be 0 |
IN PVOID pReserved3 OPTIONAL // must be NULL | | IN LPOVERLAPPED pOverlapped OPTIONAL, |
| | IN PHTTP_LOG_DATA pLogData OPTIONAL |
| | ); |
| | |
| | #else // _WIN32_WINNT >= 0x0600 |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpSendResponseEntityBody( |
| | IN HANDLE ReqQueueHandle, |
| | IN HTTP_REQUEST_ID RequestId, |
| | IN ULONG Flags, |
| | IN USHORT EntityChunkCount OPTIONAL, |
| | __in_ecount_opt(EntityChunkCount) |
| | IN PHTTP_DATA_CHUNK pEntityChunks OPTIONAL, |
| | OUT PULONG pBytesSent OPTIONAL, |
| | OUT PVOID pReserved1 OPTIONAL, // must be NULL |
| | IN ULONG Reserved2 OPTIONAL, // must be 0 |
| | IN LPOVERLAPPED pOverlapped OPTIONAL, |
| | IN PVOID pReserved3 OPTIONAL // must be NULL |
); | | ); |
| | |
|
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpWaitForDisconnect( | | HttpWaitForDisconnect( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN HTTP_CONNECTION_ID ConnectionId, | | IN HTTP_CONNECTION_ID ConnectionId, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
|
| | #if _WIN32_WINNT >= 0x0600 |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpCancelHttpRequest( |
| | IN HANDLE ReqQueueHandle, |
| | IN HTTP_REQUEST_ID RequestId, |
| | IN LPOVERLAPPED pOverlapped OPTIONAL |
| | ); |
| | |
| | HTTPAPI_LINKAGE |
| | ULONG |
| | WINAPI |
| | HttpWaitForDemandStart( |
| | IN HANDLE ReqQueueHandle, |
| | IN LPOVERLAPPED pOverlapped OPTIONAL |
| | ); |
| | |
| | #endif // _WIN32_WINNT >= 0x0600 |
| | |
// | | // |
// Cache manipulation APIs. | | // Cache manipulation APIs. |
// | | // |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpFlushResponseCache( | | HttpFlushResponseCache( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN PCWSTR pUrlPrefix, | | IN PCWSTR pUrlPrefix, |
IN ULONG Flags, | | IN ULONG Flags, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpAddFragmentToCache( | | HttpAddFragmentToCache( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN PCWSTR pUrlPrefix, | | IN PCWSTR pUrlPrefix, |
IN PHTTP_DATA_CHUNK pDataChunk, | | IN PHTTP_DATA_CHUNK pDataChunk, |
IN PHTTP_CACHE_POLICY pCachePolicy, | | IN PHTTP_CACHE_POLICY pCachePolicy, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpReadFragmentFromCache( | | HttpReadFragmentFromCache( |
|
IN HANDLE ReqQueueHandle, | | IN HANDLE ReqQueueHandle, |
IN PCWSTR pUrlPrefix, | | IN PCWSTR pUrlPrefix, |
IN PHTTP_BYTE_RANGE pByteRange OPTIONAL, | | IN PHTTP_BYTE_RANGE pByteRange OPTIONAL, |
OUT PVOID pBuffer, | | __out_bcount_part(BufferLength, *pBytesRead) OUT PVOID pBuffer, |
IN ULONG BufferLength, | | IN ULONG BufferLength, |
OUT PULONG pBytesRead OPTIONAL, | | OUT PULONG pBytesRead OPTIONAL, |
IN LPOVERLAPPED pOverlapped OPTIONAL | | IN LPOVERLAPPED pOverlapped OPTIONAL |
); | | ); |
| | |
// | | // |
// Server configuration APIs | | // Server configuration APIs |
// | | // |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpSetServiceConfiguration( | | HttpSetServiceConfiguration( |
|
IN HANDLE ServiceHandle, // Reserved, MUST be NULL | | __reserved IN HANDLE ServiceHandle, |
IN HTTP_SERVICE_CONFIG_ID ConfigId, | | IN HTTP_SERVICE_CONFIG_ID ConfigId, |
IN PVOID pConfigInformation, | | __in_bcount(ConfigInformationLength) IN PVOID pConfigInformation, |
IN ULONG ConfigInformationLength, | | IN ULONG ConfigInformationLength, |
IN LPOVERLAPPED pOverlapped // Reserved, MUST be NULL | | __reserved IN LPOVERLAPPED pOverlapped |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpDeleteServiceConfiguration( | | HttpDeleteServiceConfiguration( |
|
IN HANDLE ServiceHandle, // Reserved, MUST be NULL | | __reserved IN HANDLE ServiceHandle, |
IN HTTP_SERVICE_CONFIG_ID ConfigId, | | IN HTTP_SERVICE_CONFIG_ID ConfigId, |
IN PVOID pConfigInformation, | | __in_bcount(ConfigInformationLength) IN PVOID pConfigInformation, |
IN ULONG ConfigInformationLength, | | IN ULONG ConfigInformationLength, |
IN LPOVERLAPPED pOverlapped // Reserved, MUST be NULL | | __reserved IN LPOVERLAPPED pOverlapped |
); | | ); |
| | |
HTTPAPI_LINKAGE | | HTTPAPI_LINKAGE |
ULONG | | ULONG |
WINAPI | | WINAPI |
HttpQueryServiceConfiguration( | | HttpQueryServiceConfiguration( |
|
IN HANDLE ServiceHandle, // Reserved, MUST be NULL | | __reserved IN HANDLE ServiceHandle, |
IN HTTP_SERVICE_CONFIG_ID ConfigId, | | IN HTTP_SERVICE_CONFIG_ID ConfigId, |
IN PVOID pInputConfigInformation OPTIONAL, | | __in_bcount_opt(InputConfigInformationLength) |
IN ULONG InputConfigInformationLength OPTIONAL, | | IN PVOID pInputConfigInformation OPTIONAL, |
IN OUT PVOID pOutputConfigInformation, | | IN ULONG InputConfigInformationLength OPTIONAL, |
IN ULONG OutputConfigInformationLength, | | __out_bcount_part_opt(OutputConfigInformationLength, *pReturnLength) |
OUT PULONG pReturnLength, | | OUT PVOID pOutputConfigInformation OPTIONAL, |
IN LPOVERLAPPED pOverlapped // Reserved, MUST be NULL | | IN ULONG OutputConfigInformationLength OPTIONAL, |
| | __out_opt OUT PULONG pReturnLength OPTIONAL, |
| | __reserved IN LPOVERLAPPED pOverlapped |
); | | ); |
| | |
#ifdef __cplusplus | | #ifdef __cplusplus |
} // extern "C" | | } // extern "C" |
#endif // __cplusplus | | #endif // __cplusplus |
| | |
|
| | #endif // _WIN32_WINNT >= 0x0501 |
| | |
#endif // __HTTP_H__ | | #endif // __HTTP_H__ |
| | |
End of changes. 60 change blocks. |
118 lines changed or deleted | | 1305 lines changed or added |
|