ReactOS  0.4.14-dev-838-g99f979d
http.h File Reference
#include <winsock2.h>
#include <ws2tcpip.h>
Include dependency graph for http.h:

Go to the source code of this file.

Classes

struct  _HTTPAPI_VERSION
 
struct  _HTTP_VERSION
 
struct  _HTTP_COOKED_URL
 
struct  _HTTP_TRANSPORT_ADDRESS
 
struct  _HTTP_UNKNOWN_HEADER
 
struct  _HTTP_KNOWN_HEADER
 
struct  _HTTP_REQUEST_HEADERS
 
struct  _HTTP_BYTE_RANGE
 
struct  _HTTP_DATA_CHUNK
 
struct  _HTTP_SSL_CLIENT_CERT_INFO
 
struct  _HTTP_SSL_INFO
 
struct  _HTTP_REQUEST_V1
 
struct  _HTTP_REQUEST_INFO
 
struct  _HTTP_REQUEST_V2
 
struct  _HTTP_RESPONSE_HEADERS
 
struct  _HTTP_RESPONSE_V1
 
struct  _HTTP_RESPONSE_INFO
 
struct  _HTTP_RESPONSE_V2
 
struct  _HTTP_CACHE_POLICY
 
struct  _HTTP_LOG_DATA
 
struct  _HTTP_PROPERTY_FLAGS
 
struct  _HTTP_BINDING_INFO
 

Macros

#define HTTPAPI_VERSION_1   {1,0}
 
#define HTTPAPI_VERSION_2   {2,0}
 
#define HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING   0x00000001
 
#define HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER   0x00000002
 
#define HTTP_INITIALIZE_SERVER   0x00000001
 
#define HTTP_INITIALIZE_CONFIG   0x00000002
 
#define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY   0x00000001
 
#define HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY   0x00000002
 
#define HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS   0x00000001
 
#define HTTP_REQUEST_FLAG_IP_ROUTED   0x00000002
 
#define HTTP_REQUEST_FLAG_HTTP2   0x00000004
 
#define HTTP_SEND_RESPONSE_FLAG_DISCONNECT   0x00000001
 
#define HTTP_SEND_RESPONSE_FLAG_MORE_DATA   0x00000002
 
#define HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA   0x00000004
 
#define HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING   0x00000008
 
#define HTTP_SEND_RESPONSE_FLAG_PROCESS_RANGES   0x00000020
 
#define HTTP_SEND_RESPONSE_FLAG_OPAQUE   0x00000040
 
#define HTTP_URL_FLAG_REMOVE_ALL   0x0000001
 
#define HTTP_NULL_ID   ((ULONGLONG)0)
 
#define HTTP_BYTE_RANGE_TO_EOF   ((ULONGLONG)-1)
 

Typedefs

typedef struct _HTTPAPI_VERSION HTTPAPI_VERSION
 
typedef struct _HTTPAPI_VERSIONPHTTPAPI_VERSION
 
typedef enum _HTTP_SERVICE_CONFIG_ID HTTP_SERVICE_CONFIG_ID
 
typedef enum _HTTP_SERVICE_CONFIG_IDPHTTP_SERVICE_CONFIG_ID
 
typedef ULONGLONG HTTP_OPAQUE_ID
 
typedef ULONGLONGPHTTP_OPAQUE_ID
 
typedef HTTP_OPAQUE_ID HTTP_CONNECTION_ID
 
typedef HTTP_OPAQUE_IDPHTTP_CONNECTION_ID
 
typedef HTTP_OPAQUE_ID HTTP_RAW_CONNECTION_ID
 
typedef HTTP_OPAQUE_IDPHTTP_RAW_CONNECTION_ID
 
typedef HTTP_OPAQUE_ID HTTP_REQUEST_ID
 
typedef HTTP_OPAQUE_IDPHTTP_REQUEST_ID
 
typedef HTTP_OPAQUE_ID HTTP_SERVER_SESSION_ID
 
typedef HTTP_OPAQUE_IDPHTTP_SERVER_SESSION_ID
 
typedef HTTP_OPAQUE_ID HTTP_URL_GROUP_ID
 
typedef HTTP_OPAQUE_IDPHTTP_URL_GROUP_ID
 
typedef ULONGLONG HTTP_URL_CONTEXT
 
typedef struct _HTTP_VERSION HTTP_VERSION
 
typedef struct _HTTP_VERSIONPHTTP_VERSION
 
typedef enum _HTTP_VERB HTTP_VERB
 
typedef enum _HTTP_VERBPHTTP_VERB
 
typedef struct _HTTP_COOKED_URL HTTP_COOKED_URL
 
typedef struct _HTTP_COOKED_URLPHTTP_COOKED_URL
 
typedef struct _HTTP_TRANSPORT_ADDRESS HTTP_TRANSPORT_ADDRESS
 
typedef struct _HTTP_TRANSPORT_ADDRESSPHTTP_TRANSPORT_ADDRESS
 
typedef struct _HTTP_UNKNOWN_HEADER HTTP_UNKNOWN_HEADER
 
typedef struct _HTTP_UNKNOWN_HEADERPHTTP_UNKNOWN_HEADER
 
typedef struct _HTTP_KNOWN_HEADER HTTP_KNOWN_HEADER
 
typedef struct _HTTP_KNOWN_HEADERPHTTP_KNOWN_HEADER
 
typedef enum _HTTP_HEADER_ID HTTP_HEADER_ID
 
typedef enum _HTTP_HEADER_IDPHTTP_HEADER_ID
 
typedef struct _HTTP_REQUEST_HEADERS HTTP_REQUEST_HEADERS
 
typedef struct _HTTP_REQUEST_HEADERSPHTTP_REQUEST_HEADERS
 
typedef enum _HTTP_DATA_CHUNK_TYPE HTTP_DATA_CHUNK_TYPE
 
typedef enum _HTTP_DATA_CHUNK_TYPEPHTTP_DATA_CHUNK_TYPE
 
typedef struct _HTTP_BYTE_RANGE HTTP_BYTE_RANGE
 
typedef struct _HTTP_BYTE_RANGEPHTTP_BYTE_RANGE
 
typedef struct _HTTP_DATA_CHUNK HTTP_DATA_CHUNK
 
typedef struct _HTTP_DATA_CHUNKPHTTP_DATA_CHUNK
 
typedef struct _HTTP_SSL_CLIENT_CERT_INFO HTTP_SSL_CLIENT_CERT_INFO
 
typedef struct _HTTP_SSL_CLIENT_CERT_INFOPHTTP_SSL_CLIENT_CERT_INFO
 
typedef struct _HTTP_SSL_INFO HTTP_SSL_INFO
 
typedef struct _HTTP_SSL_INFOPHTTP_SSL_INFO
 
typedef struct _HTTP_REQUEST_V1 HTTP_REQUEST_V1
 
typedef enum _HTTP_REQUEST_INFO_TYPE HTTP_REQUEST_INFO_TYPE
 
typedef enum _HTTP_REQUEST_INFO_TYPEPHTTP_REQUEST_INFO_TYPE
 
typedef struct _HTTP_REQUEST_INFO HTTP_REQUEST_INFO
 
typedef struct _HTTP_REQUEST_INFOPHTTP_REQUEST_INFO
 
typedef struct _HTTP_REQUEST_V2 HTTP_REQUEST_V2
 
typedef struct _HTTP_REQUEST_V2PHTTP_REQUEST_V2
 
typedef HTTP_REQUEST_V2 HTTP_REQUEST
 
typedef HTTP_REQUEST_V2PHTTP_REQUEST
 
typedef struct _HTTP_RESPONSE_HEADERS HTTP_RESPONSE_HEADERS
 
typedef struct _HTTP_RESPONSE_HEADERSPHTTP_RESPONSE_HEADERS
 
typedef struct _HTTP_RESPONSE_V1 HTTP_RESPONSE_V1
 
typedef struct _HTTP_RESPONSE_V1PHTTP_RESPONSE_V1
 
typedef enum _HTTP_RESPONSE_INFO_TYPE HTTP_RESPONSE_INFO_TYPE
 
typedef enum _HTTP_RESPONSE_INFO_TYPEPHTTP_RESPONSE_INFO_TYPE
 
typedef struct _HTTP_RESPONSE_INFO HTTP_RESPONSE_INFO
 
typedef struct _HTTP_RESPONSE_INFOPHTTP_RESPONSE_INFO
 
typedef struct _HTTP_RESPONSE_V2 HTTP_RESPONSE_V2
 
typedef struct _HTTP_RESPONSE_V2PHTTP_RESPONSE_V2
 
typedef HTTP_RESPONSE_V2 HTTP_RESPONSE
 
typedef HTTP_RESPONSE_V2PHTTP_RESPONSE
 
typedef enum _HTTP_CACHE_POLICY_TYPE HTTP_CACHE_POLICY_TYPE
 
typedef enum _HTTP_CACHE_POLICY_TYPEPHTTP_CACHE_POLICY_TYPE
 
typedef struct _HTTP_CACHE_POLICY HTTP_CACHE_POLICY
 
typedef struct _HTTP_CACHE_POLICYPHTTP_CACHE_POLICY
 
typedef enum _HTTP_LOG_DATA_TYPE HTTP_LOG_DATA_TYPE
 
typedef enum _HTTP_LOG_DATA_TYPEPHTTP_LOG_DATA_TYPE
 
typedef struct _HTTP_LOG_DATA HTTP_LOG_DATA
 
typedef struct _HTTP_LOG_DATAPHTTP_LOG_DATA
 
typedef enum _HTTP_SERVER_PROPERTY HTTP_SERVER_PROPERTY
 
typedef enum _HTTP_SERVER_PROPERTYPHTTP_SERVER_PROPERTY
 
typedef struct _HTTP_PROPERTY_FLAGS HTTP_PROPERTY_FLAGS
 
typedef struct _HTTP_PROPERTY_FLAGSPHTTP_PROPERTY_FLAGS
 
typedef struct _HTTP_BINDING_INFO HTTP_BINDING_INFO
 
typedef struct _HTTP_BINDING_INFOPHTTP_BINDING_INFO
 

Enumerations

enum  _HTTP_SERVICE_CONFIG_ID {
  HttpServiceConfigIPListenList, HttpServiceConfigSSLCertInfo, HttpServiceConfigUrlAclInfo, HttpServiceConfigTimeout,
  HttpServiceConfigMax
}
 
enum  _HTTP_VERB {
  HttpVerbUnparsed = 0, HttpVerbUnknown, HttpVerbInvalid, HttpVerbOPTIONS,
  HttpVerbGET, HttpVerbHEAD, HttpVerbPOST, HttpVerbPUT,
  HttpVerbDELETE, HttpVerbTRACE, HttpVerbCONNECT, HttpVerbTRACK,
  HttpVerbMOVE, HttpVerbCOPY, HttpVerbPROPFIND, HttpVerbPROPPATCH,
  HttpVerbMKCOL, HttpVerbLOCK, HttpVerbUNLOCK, HttpVerbSEARCH,
  HttpVerbMaximum
}
 
enum  _HTTP_HEADER_ID {
  HttpHeaderCacheControl = 0, HttpHeaderConnection = 1, HttpHeaderDate = 2, HttpHeaderKeepAlive = 3,
  HttpHeaderPragma = 4, HttpHeaderTrailer = 5, HttpHeaderTransferEncoding = 6, HttpHeaderUpgrade = 7,
  HttpHeaderVia = 8, HttpHeaderWarning = 9, HttpHeaderAllow = 10, HttpHeaderContentLength = 11,
  HttpHeaderContentType = 12, HttpHeaderContentEncoding = 13, HttpHeaderContentLanguage = 14, HttpHeaderContentLocation = 15,
  HttpHeaderContentMd5 = 16, HttpHeaderContentRange = 17, HttpHeaderExpires = 18, HttpHeaderLastModified = 19,
  HttpHeaderAccept = 20, HttpHeaderAcceptCharset = 21, HttpHeaderAcceptEncoding = 22, HttpHeaderAcceptLanguage = 23,
  HttpHeaderAuthorization = 24, HttpHeaderCookie = 25, HttpHeaderExpect = 26, HttpHeaderFrom = 27,
  HttpHeaderHost = 28, HttpHeaderIfMatch = 29, HttpHeaderIfModifiedSince = 30, HttpHeaderIfNoneMatch = 31,
  HttpHeaderIfRange = 32, HttpHeaderIfUnmodifiedSince = 33, HttpHeaderMaxForwards = 34, HttpHeaderProxyAuthorization = 35,
  HttpHeaderReferer = 36, HttpHeaderRange = 37, HttpHeaderTe = 38, HttpHeaderTranslate = 39,
  HttpHeaderUserAgent = 40, HttpHeaderRequestMaximum = 41, HttpHeaderAcceptRanges = 20, HttpHeaderAge = 21,
  HttpHeaderEtag = 22, HttpHeaderLocation = 23, HttpHeaderProxyAuthenticate = 24, HttpHeaderRetryAfter = 25,
  HttpHeaderServer = 26, HttpHeaderSetCookie = 27, HttpHeaderVary = 28, HttpHeaderWwwAuthenticate = 29,
  HttpHeaderResponseMaximum = 30, HttpHeaderMaximum = 41
}
 
enum  _HTTP_DATA_CHUNK_TYPE {
  HttpDataChunkFromMemory = 0, HttpDataChunkFromFileHandle, HttpDataChunkFromFragmentCache, HttpDataChunkFromFragmentCacheEx,
  HttpDataChunkMaximum
}
 
enum  _HTTP_REQUEST_INFO_TYPE { HttpRequestInfoTypeAuth = 0 }
 
enum  _HTTP_RESPONSE_INFO_TYPE { HttpResponseInfoTypeMultipleKnownHeaders = 0, HttpResponseInfoTypeAuthenticationProperty, HttpResponseInfoTypeQosProperty, HttpResponseInfoTypeChannelBind }
 
enum  _HTTP_CACHE_POLICY_TYPE { HttpCachePolicyNocache, HttpCachePolicyUserInvalidates, HttpCachePolicyTimeToLive, HttpCachePolicyMaximum }
 
enum  _HTTP_LOG_DATA_TYPE { HttpLogDataTypeFields = 0 }
 
enum  _HTTP_SERVER_PROPERTY {
  HttpServerAuthenticationProperty, HttpServerLoggingProperty, HttpServerQosProperty, HttpServerTimeoutsProperty,
  HttpServerQueueLengthProperty, HttpServerStateProperty, HttpServer503VerbosityProperty, HttpServerBindingProperty,
  HttpServerExtendedAuthenticationProperty, HttpServerListenEndpointProperty, HttpServerChannelBindProperty, HttpServerProtectionLevelProperty
}
 

Functions

ULONG WINAPI HttpAddUrl (HANDLE, PCWSTR, PVOID)
 
ULONG WINAPI HttpAddUrlToUrlGroup (HTTP_URL_GROUP_ID id, const WCHAR *url, HTTP_URL_CONTEXT context, ULONG reserved)
 
ULONG WINAPI HttpCloseRequestQueue (HANDLE handle)
 
ULONG WINAPI HttpCloseServerSession (HTTP_SERVER_SESSION_ID id)
 
ULONG WINAPI HttpCloseUrlGroup (HTTP_URL_GROUP_ID id)
 
ULONG WINAPI HttpCreateHttpHandle (PHANDLE, ULONG)
 
ULONG WINAPI HttpCreateRequestQueue (HTTPAPI_VERSION version, const WCHAR *name, SECURITY_ATTRIBUTES *sa, ULONG flags, HANDLE *handle)
 
ULONG WINAPI HttpCreateServerSession (HTTPAPI_VERSION, PHTTP_SERVER_SESSION_ID, ULONG)
 
ULONG WINAPI HttpCreateUrlGroup (HTTP_SERVER_SESSION_ID session_id, HTTP_URL_GROUP_ID *group_id, ULONG reserved)
 
ULONG WINAPI HttpDeleteServiceConfiguration (HANDLE, HTTP_SERVICE_CONFIG_ID, PVOID, ULONG, LPOVERLAPPED)
 
ULONG WINAPI HttpInitialize (HTTPAPI_VERSION version, ULONG flags, void *reserved)
 
ULONG WINAPI HttpTerminate (ULONG flags, void *reserved)
 
ULONG WINAPI HttpQueryServiceConfiguration (HANDLE, HTTP_SERVICE_CONFIG_ID, PVOID, ULONG, PVOID, ULONG, PULONG, LPOVERLAPPED)
 
ULONG WINAPI HttpReceiveHttpRequest (HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_REQUEST *request, ULONG size, ULONG *ret_size, OVERLAPPED *ovl)
 
ULONG WINAPI HttpRemoveUrl (HANDLE queue, const WCHAR *url)
 
ULONG WINAPI HttpRemoveUrlFromUrlGroup (HTTP_URL_GROUP_ID id, const WCHAR *url, ULONG flags)
 
ULONG WINAPI HttpSendHttpResponse (HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_RESPONSE *response, HTTP_CACHE_POLICY *cache_policy, ULONG *ret_size, void *reserved1, ULONG reserved2, OVERLAPPED *ovl, HTTP_LOG_DATA *log_data)
 
ULONG WINAPI HttpSetServiceConfiguration (HANDLE, HTTP_SERVICE_CONFIG_ID, PVOID, ULONG, LPOVERLAPPED)
 
ULONG WINAPI HttpSetUrlGroupProperty (HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG length)
 

Macro Definition Documentation

◆ HTTP_BYTE_RANGE_TO_EOF

#define HTTP_BYTE_RANGE_TO_EOF   ((ULONGLONG)-1)

Definition at line 223 of file http.h.

◆ HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER

#define HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER   0x00000002

Definition at line 41 of file http.h.

◆ HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING

#define HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING   0x00000001

Definition at line 40 of file http.h.

◆ HTTP_INITIALIZE_CONFIG

#define HTTP_INITIALIZE_CONFIG   0x00000002

Definition at line 44 of file http.h.

◆ HTTP_INITIALIZE_SERVER

#define HTTP_INITIALIZE_SERVER   0x00000001

Definition at line 43 of file http.h.

◆ HTTP_NULL_ID

#define HTTP_NULL_ID   ((ULONGLONG)0)

Definition at line 71 of file http.h.

◆ HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY

#define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY   0x00000001

Definition at line 46 of file http.h.

◆ HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY

#define HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY   0x00000002

Definition at line 47 of file http.h.

◆ HTTP_REQUEST_FLAG_HTTP2

#define HTTP_REQUEST_FLAG_HTTP2   0x00000004

Definition at line 51 of file http.h.

◆ HTTP_REQUEST_FLAG_IP_ROUTED

#define HTTP_REQUEST_FLAG_IP_ROUTED   0x00000002

Definition at line 50 of file http.h.

◆ HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS

#define HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS   0x00000001

Definition at line 49 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA

#define HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA   0x00000004

Definition at line 55 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_DISCONNECT

#define HTTP_SEND_RESPONSE_FLAG_DISCONNECT   0x00000001

Definition at line 53 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING

#define HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING   0x00000008

Definition at line 56 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_MORE_DATA

#define HTTP_SEND_RESPONSE_FLAG_MORE_DATA   0x00000002

Definition at line 54 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_OPAQUE

#define HTTP_SEND_RESPONSE_FLAG_OPAQUE   0x00000040

Definition at line 58 of file http.h.

◆ HTTP_SEND_RESPONSE_FLAG_PROCESS_RANGES

#define HTTP_SEND_RESPONSE_FLAG_PROCESS_RANGES   0x00000020

Definition at line 57 of file http.h.

◆ HTTP_URL_FLAG_REMOVE_ALL

#define HTTP_URL_FLAG_REMOVE_ALL   0x0000001

Definition at line 60 of file http.h.

◆ HTTPAPI_VERSION_1

#define HTTPAPI_VERSION_1   {1,0}

Definition at line 37 of file http.h.

◆ HTTPAPI_VERSION_2

#define HTTPAPI_VERSION_2   {2,0}

Definition at line 38 of file http.h.

Typedef Documentation

◆ HTTP_BINDING_INFO

◆ HTTP_BYTE_RANGE

◆ HTTP_CACHE_POLICY

◆ HTTP_CACHE_POLICY_TYPE

◆ HTTP_CONNECTION_ID

Definition at line 74 of file http.h.

◆ HTTP_COOKED_URL

◆ HTTP_DATA_CHUNK

◆ HTTP_DATA_CHUNK_TYPE

◆ HTTP_HEADER_ID

◆ HTTP_KNOWN_HEADER

◆ HTTP_LOG_DATA

◆ HTTP_LOG_DATA_TYPE

◆ HTTP_OPAQUE_ID

Definition at line 73 of file http.h.

◆ HTTP_PROPERTY_FLAGS

◆ HTTP_RAW_CONNECTION_ID

Definition at line 75 of file http.h.

◆ HTTP_REQUEST

Definition at line 324 of file http.h.

◆ HTTP_REQUEST_HEADERS

◆ HTTP_REQUEST_ID

Definition at line 76 of file http.h.

◆ HTTP_REQUEST_INFO

◆ HTTP_REQUEST_INFO_TYPE

◆ HTTP_REQUEST_V1

◆ HTTP_REQUEST_V2

◆ HTTP_RESPONSE

Definition at line 377 of file http.h.

◆ HTTP_RESPONSE_HEADERS

◆ HTTP_RESPONSE_INFO

◆ HTTP_RESPONSE_INFO_TYPE

◆ HTTP_RESPONSE_V1

◆ HTTP_RESPONSE_V2

◆ HTTP_SERVER_PROPERTY

◆ HTTP_SERVER_SESSION_ID

Definition at line 77 of file http.h.

◆ HTTP_SERVICE_CONFIG_ID

◆ HTTP_SSL_CLIENT_CERT_INFO

◆ HTTP_SSL_INFO

◆ HTTP_TRANSPORT_ADDRESS

◆ HTTP_UNKNOWN_HEADER

◆ HTTP_URL_CONTEXT

Definition at line 79 of file http.h.

◆ HTTP_URL_GROUP_ID

Definition at line 78 of file http.h.

◆ HTTP_VERB

◆ HTTP_VERSION

◆ HTTPAPI_VERSION

◆ PHTTP_BINDING_INFO

◆ PHTTP_BYTE_RANGE

◆ PHTTP_CACHE_POLICY

◆ PHTTP_CACHE_POLICY_TYPE

◆ PHTTP_CONNECTION_ID

Definition at line 74 of file http.h.

◆ PHTTP_COOKED_URL

◆ PHTTP_DATA_CHUNK

◆ PHTTP_DATA_CHUNK_TYPE

◆ PHTTP_HEADER_ID

◆ PHTTP_KNOWN_HEADER

◆ PHTTP_LOG_DATA

◆ PHTTP_LOG_DATA_TYPE

◆ PHTTP_OPAQUE_ID

Definition at line 73 of file http.h.

◆ PHTTP_PROPERTY_FLAGS

◆ PHTTP_RAW_CONNECTION_ID

Definition at line 75 of file http.h.

◆ PHTTP_REQUEST

Definition at line 324 of file http.h.

◆ PHTTP_REQUEST_HEADERS

◆ PHTTP_REQUEST_ID

Definition at line 76 of file http.h.

◆ PHTTP_REQUEST_INFO

◆ PHTTP_REQUEST_INFO_TYPE

◆ PHTTP_REQUEST_V2

◆ PHTTP_RESPONSE

Definition at line 377 of file http.h.

◆ PHTTP_RESPONSE_HEADERS

◆ PHTTP_RESPONSE_INFO

◆ PHTTP_RESPONSE_INFO_TYPE

◆ PHTTP_RESPONSE_V1

◆ PHTTP_RESPONSE_V2

◆ PHTTP_SERVER_PROPERTY

◆ PHTTP_SERVER_SESSION_ID

Definition at line 77 of file http.h.

◆ PHTTP_SERVICE_CONFIG_ID

◆ PHTTP_SSL_CLIENT_CERT_INFO

◆ PHTTP_SSL_INFO

◆ PHTTP_TRANSPORT_ADDRESS

◆ PHTTP_UNKNOWN_HEADER

◆ PHTTP_URL_GROUP_ID

Definition at line 78 of file http.h.

◆ PHTTP_VERB

◆ PHTTP_VERSION

◆ PHTTPAPI_VERSION

Enumeration Type Documentation

◆ _HTTP_CACHE_POLICY_TYPE

Enumerator
HttpCachePolicyNocache 
HttpCachePolicyUserInvalidates 
HttpCachePolicyTimeToLive 
HttpCachePolicyMaximum 

Definition at line 379 of file http.h.

◆ _HTTP_DATA_CHUNK_TYPE

Enumerator
HttpDataChunkFromMemory 
HttpDataChunkFromFileHandle 
HttpDataChunkFromFragmentCache 
HttpDataChunkFromFragmentCacheEx 
HttpDataChunkMaximum 

Definition at line 214 of file http.h.

◆ _HTTP_HEADER_ID

Enumerator
HttpHeaderCacheControl 
HttpHeaderConnection 
HttpHeaderDate 
HttpHeaderKeepAlive 
HttpHeaderPragma 
HttpHeaderTrailer 
HttpHeaderTransferEncoding 
HttpHeaderUpgrade 
HttpHeaderVia 
HttpHeaderWarning 
HttpHeaderAllow 
HttpHeaderContentLength 
HttpHeaderContentType 
HttpHeaderContentEncoding 
HttpHeaderContentLanguage 
HttpHeaderContentLocation 
HttpHeaderContentMd5 
HttpHeaderContentRange 
HttpHeaderExpires 
HttpHeaderLastModified 
HttpHeaderAccept 
HttpHeaderAcceptCharset 
HttpHeaderAcceptEncoding 
HttpHeaderAcceptLanguage 
HttpHeaderAuthorization 
HttpHeaderCookie 
HttpHeaderExpect 
HttpHeaderFrom 
HttpHeaderHost 
HttpHeaderIfMatch 
HttpHeaderIfModifiedSince 
HttpHeaderIfNoneMatch 
HttpHeaderIfRange 
HttpHeaderIfUnmodifiedSince 
HttpHeaderMaxForwards 
HttpHeaderProxyAuthorization 
HttpHeaderReferer 
HttpHeaderRange 
HttpHeaderTe 
HttpHeaderTranslate 
HttpHeaderUserAgent 
HttpHeaderRequestMaximum 
HttpHeaderAcceptRanges 
HttpHeaderAge 
HttpHeaderEtag 
HttpHeaderLocation 
HttpHeaderProxyAuthenticate 
HttpHeaderRetryAfter 
HttpHeaderServer 
HttpHeaderSetCookie 
HttpHeaderVary 
HttpHeaderWwwAuthenticate 
HttpHeaderResponseMaximum 
HttpHeaderMaximum 

Definition at line 144 of file http.h.

145 {
148  HttpHeaderDate = 2,
150  HttpHeaderPragma = 4,
151  HttpHeaderTrailer = 5,
153  HttpHeaderUpgrade = 7,
154  HttpHeaderVia = 8,
155  HttpHeaderWarning = 9,
156  HttpHeaderAllow = 10,
164  HttpHeaderExpires = 18,
166 
167  HttpHeaderAccept = 20,
172  HttpHeaderCookie = 25,
173  HttpHeaderExpect = 26,
174  HttpHeaderFrom = 27,
175  HttpHeaderHost = 28,
176  HttpHeaderIfMatch = 29,
179  HttpHeaderIfRange = 32,
183  HttpHeaderReferer = 36,
184  HttpHeaderRange = 37,
185  HttpHeaderTe = 38,
186  HttpHeaderTranslate = 39,
187  HttpHeaderUserAgent = 40,
189 
191  HttpHeaderAge = 21,
192  HttpHeaderEtag = 22,
193  HttpHeaderLocation = 23,
196  HttpHeaderServer = 26,
197  HttpHeaderSetCookie = 27,
198  HttpHeaderVary = 28,
201 
202  HttpHeaderMaximum = 41,
enum _HTTP_HEADER_ID HTTP_HEADER_ID
enum _HTTP_HEADER_ID * PHTTP_HEADER_ID

◆ _HTTP_LOG_DATA_TYPE

Enumerator
HttpLogDataTypeFields 

Definition at line 393 of file http.h.

394 {
enum _HTTP_LOG_DATA_TYPE * PHTTP_LOG_DATA_TYPE
enum _HTTP_LOG_DATA_TYPE HTTP_LOG_DATA_TYPE

◆ _HTTP_REQUEST_INFO_TYPE

Enumerator
HttpRequestInfoTypeAuth 

Definition at line 297 of file http.h.

298 {
enum _HTTP_REQUEST_INFO_TYPE HTTP_REQUEST_INFO_TYPE
enum _HTTP_REQUEST_INFO_TYPE * PHTTP_REQUEST_INFO_TYPE

◆ _HTTP_RESPONSE_INFO_TYPE

Enumerator
HttpResponseInfoTypeMultipleKnownHeaders 
HttpResponseInfoTypeAuthenticationProperty 
HttpResponseInfoTypeQosProperty 
HttpResponseInfoTypeChannelBind 

Definition at line 347 of file http.h.

◆ _HTTP_SERVER_PROPERTY

Enumerator
HttpServerAuthenticationProperty 
HttpServerLoggingProperty 
HttpServerQosProperty 
HttpServerTimeoutsProperty 
HttpServerQueueLengthProperty 
HttpServerStateProperty 
HttpServer503VerbosityProperty 
HttpServerBindingProperty 
HttpServerExtendedAuthenticationProperty 
HttpServerListenEndpointProperty 
HttpServerChannelBindProperty 
HttpServerProtectionLevelProperty 

Definition at line 403 of file http.h.

◆ _HTTP_SERVICE_CONFIG_ID

Enumerator
HttpServiceConfigIPListenList 
HttpServiceConfigSSLCertInfo 
HttpServiceConfigUrlAclInfo 
HttpServiceConfigTimeout 
HttpServiceConfigMax 

Definition at line 62 of file http.h.

◆ _HTTP_VERB

Enumerator
HttpVerbUnparsed 
HttpVerbUnknown 
HttpVerbInvalid 
HttpVerbOPTIONS 
HttpVerbGET 
HttpVerbHEAD 
HttpVerbPOST 
HttpVerbPUT 
HttpVerbDELETE 
HttpVerbTRACE 
HttpVerbCONNECT 
HttpVerbTRACK 
HttpVerbMOVE 
HttpVerbCOPY 
HttpVerbPROPFIND 
HttpVerbPROPPATCH 
HttpVerbMKCOL 
HttpVerbLOCK 
HttpVerbUNLOCK 
HttpVerbSEARCH 
HttpVerbMaximum 

Definition at line 87 of file http.h.

Function Documentation

◆ HttpAddUrl()

ULONG WINAPI HttpAddUrl ( HANDLE  ,
PCWSTR  ,
PVOID   
)

◆ HttpAddUrlToUrlGroup()

ULONG WINAPI HttpAddUrlToUrlGroup ( HTTP_URL_GROUP_ID  id,
const WCHAR url,
HTTP_URL_CONTEXT  context,
ULONG  reserved 
)

Definition at line 646 of file httpapi_main.c.

648 {
649  struct url_group *group = get_url_group(id);
650 
651  TRACE("id %s, url %s, context %s, reserved %#x.\n", wine_dbgstr_longlong(id),
653 
654  if (group->url)
655  {
656  FIXME("Multiple URLs are not handled!\n");
658  }
659 
660  if (!(group->url = heap_strdupW(url)))
661  return ERROR_OUTOFMEMORY;
662  group->context = context;
663 
664  if (group->queue)
665  return add_url(group->queue, url, context);
666 
667  return ERROR_SUCCESS;
668 }
#define ERROR_SUCCESS
Definition: deptool.c:10
Definition: http.c:7094
static ULONG add_url(HANDLE queue, const WCHAR *urlW, HTTP_URL_CONTEXT context)
Definition: httpapi_main.c:217
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
r reserved
Definition: btrfs.c:2865
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
HTTP_URL_CONTEXT context
Definition: httpapi_main.c:489
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: httpapi_main.c:35
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
static struct url_group * get_url_group(HTTP_URL_GROUP_ID id)
Definition: httpapi_main.c:494
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ HttpCloseRequestQueue()

ULONG WINAPI HttpCloseRequestQueue ( HANDLE  handle)

Definition at line 725 of file httpapi_main.c.

726 {
727  TRACE("handle %p.\n", handle);
728  if (!CloseHandle(handle))
729  return GetLastError();
730  return ERROR_SUCCESS;
731 }
#define CloseHandle
Definition: compat.h:406
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define TRACE(s)
Definition: solgame.cpp:4

◆ HttpCloseServerSession()

ULONG WINAPI HttpCloseServerSession ( HTTP_SERVER_SESSION_ID  id)

Definition at line 554 of file httpapi_main.c.

555 {
556  struct url_group *group, *group_next;
557  struct server_session *session;
558 
559  TRACE("id %s.\n", wine_dbgstr_longlong(id));
560 
561  if (!(session = get_server_session(id)))
563 
564  LIST_FOR_EACH_ENTRY_SAFE(group, group_next, &session->groups, struct url_group, session_entry)
565  {
567  }
568  list_remove(&session->entry);
570  return ERROR_SUCCESS;
571 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ERROR_SUCCESS
Definition: deptool.c:10
static struct server_session * get_server_session(HTTP_SERVER_SESSION_ID id)
Definition: httpapi_main.c:513
uint32_t ULONG_PTR
Definition: typedefs.h:63
GLboolean GLuint group
Definition: glext.h:11120
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id)
Definition: httpapi_main.c:600
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ HttpCloseUrlGroup()

ULONG WINAPI HttpCloseUrlGroup ( HTTP_URL_GROUP_ID  id)

Definition at line 600 of file httpapi_main.c.

601 {
602  struct url_group *group;
603 
604  TRACE("id %s.\n", wine_dbgstr_longlong(id));
605 
606  if (!(group = get_url_group(id)))
608 
609  list_remove(&group->session_entry);
610  list_remove(&group->entry);
611  heap_free(group);
612 
613  return ERROR_SUCCESS;
614 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ERROR_SUCCESS
Definition: deptool.c:10
GLboolean GLuint group
Definition: glext.h:11120
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static struct url_group * get_url_group(HTTP_URL_GROUP_ID id)
Definition: httpapi_main.c:494
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by HttpCloseServerSession().

◆ HttpCreateHttpHandle()

ULONG WINAPI HttpCreateHttpHandle ( PHANDLE  ,
ULONG   
)

◆ HttpCreateRequestQueue()

ULONG WINAPI HttpCreateRequestQueue ( HTTPAPI_VERSION  version,
const WCHAR name,
SECURITY_ATTRIBUTES sa,
ULONG  flags,
HANDLE handle 
)

Definition at line 697 of file httpapi_main.c.

699 {
700  OBJECT_ATTRIBUTES attr = {sizeof(attr)};
703 
704  TRACE("version %u.%u, name %s, sa %p, flags %#x, handle %p.\n",
705  version.HttpApiMajorVersion, version.HttpApiMinorVersion,
707 
708  if (name)
709  FIXME("Unhandled name %s.\n", debugstr_w(name));
710  if (flags)
711  FIXME("Unhandled flags %#x.\n", flags);
712 
714  attr.ObjectName = &string;
715  if (sa && sa->bInheritHandle)
716  attr.Attributes |= OBJ_INHERIT;
717  attr.SecurityDescriptor = sa ? sa->lpSecurityDescriptor : NULL;
720 }
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:66
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
#define OBJ_INHERIT
Definition: winternl.h:225
Definition: cookie.c:201
GLbitfield flags
Definition: glext.h:7161
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
__u8 attr
Definition: mkdosfs.c:359
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
static const WCHAR device_nameW[]
Definition: httpapi_main.c:33
char string[160]
Definition: util.h:11
#define FILE_OPEN
Definition: from_kernel.h:54
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
Definition: name.c:38
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static struct sockaddr_in sa
Definition: adnsresfilter.c:69

◆ HttpCreateServerSession()

ULONG WINAPI HttpCreateServerSession ( HTTPAPI_VERSION  ,
PHTTP_SERVER_SESSION_ID  ,
ULONG   
)

◆ HttpCreateUrlGroup()

ULONG WINAPI HttpCreateUrlGroup ( HTTP_SERVER_SESSION_ID  session_id,
HTTP_URL_GROUP_ID group_id,
ULONG  reserved 
)

Definition at line 576 of file httpapi_main.c.

577 {
578  struct server_session *session;
579  struct url_group *group;
580 
581  TRACE("session_id %s, group_id %p, reserved %#x.\n",
582  wine_dbgstr_longlong(session_id), group_id, reserved);
583 
584  if (!(session = get_server_session(session_id)))
586 
587  if (!(group = heap_alloc_zero(sizeof(*group))))
588  return ERROR_OUTOFMEMORY;
589  list_add_tail(&url_groups, &group->entry);
590  list_add_tail(&session->groups, &group->session_entry);
591 
592  *group_id = (ULONG_PTR)group;
593 
594  return ERROR_SUCCESS;
595 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ERROR_SUCCESS
Definition: deptool.c:10
static struct server_session * get_server_session(HTTP_SERVER_SESSION_ID id)
Definition: httpapi_main.c:513
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
r reserved
Definition: btrfs.c:2865
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
static struct list url_groups
Definition: httpapi_main.c:492
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define ULONG_PTR
Definition: config.h:101
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ HttpDeleteServiceConfiguration()

ULONG WINAPI HttpDeleteServiceConfiguration ( HANDLE  ,
HTTP_SERVICE_CONFIG_ID  ,
PVOID  ,
ULONG  ,
LPOVERLAPPED   
)

Definition at line 129 of file httpapi_main.c.

131 {
132  FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
133  return NO_ERROR;
134 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define NO_ERROR
Definition: dderror.h:5
#define FIXME(fmt,...)
Definition: debug.h:110
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
Definition: sock.c:82

◆ HttpInitialize()

ULONG WINAPI HttpInitialize ( HTTPAPI_VERSION  version,
ULONG  flags,
void reserved 
)

Definition at line 57 of file httpapi_main.c.

58 {
59  static const WCHAR httpW[] = {'h','t','t','p',0};
60  SC_HANDLE manager, service;
61 
62  TRACE("version %u.%u, flags %#x, reserved %p.\n", version.HttpApiMajorVersion,
63  version.HttpApiMinorVersion, flags, reserved);
64 
66  {
67  FIXME("Unhandled flags %#x.\n", flags);
69  }
70 
71  if (!(manager = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT)))
72  return GetLastError();
73 
74  if (!(service = OpenServiceW(manager, httpW, SERVICE_START)))
75  {
76  ERR("Failed to open HTTP service, error %u.\n", GetLastError());
77  CloseServiceHandle(manager);
78  return GetLastError();
79  }
80 
82  {
83  ERR("Failed to start HTTP service, error %u.\n", GetLastError());
84  CloseServiceHandle(service);
85  CloseServiceHandle(manager);
86  return GetLastError();
87  }
88 
89  CloseServiceHandle(service);
90  CloseServiceHandle(manager);
91  return ERROR_SUCCESS;
92 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define SC_MANAGER_CONNECT
Definition: winsvc.h:14
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define FIXME(fmt,...)
Definition: debug.h:110
r reserved
Definition: btrfs.c:2865
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
Definition: scm.c:2103
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:577
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:66
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
Definition: scm.c:2923
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLbitfield flags
Definition: glext.h:7161
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
Definition: scm.c:2011
#define SERVICE_START
Definition: winsvc.h:57
#define ERR(fmt,...)
Definition: debug.h:109
#define HTTP_INITIALIZE_SERVER
Definition: http.h:43
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
static const WCHAR httpW[]
Definition: assoc.c:94
#define ERROR_SERVICE_ALREADY_RUNNING
Definition: winerror.h:607

◆ HttpQueryServiceConfiguration()

ULONG WINAPI HttpQueryServiceConfiguration ( HANDLE  ,
HTTP_SERVICE_CONFIG_ID  ,
PVOID  ,
ULONG  ,
PVOID  ,
ULONG  ,
PULONG  ,
LPOVERLAPPED   
)

Definition at line 155 of file httpapi_main.c.

158 {
159  FIXME( "(%p, %d, %p, %d, %p, %d, %p, %p): stub!\n", handle, type, query, query_len,
160  buffer, buffer_len, data_len, overlapped );
161  return ERROR_FILE_NOT_FOUND;
162 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
#define FIXME(fmt,...)
Definition: debug.h:110
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
Definition: sock.c:82

◆ HttpReceiveHttpRequest()

ULONG WINAPI HttpReceiveHttpRequest ( HANDLE  queue,
HTTP_REQUEST_ID  id,
ULONG  flags,
HTTP_REQUEST request,
ULONG  size,
ULONG ret_size,
OVERLAPPED ovl 
)

Definition at line 287 of file httpapi_main.c.

289 {
290 #ifndef __REACTOS__
292  {
293  .addr = (ULONG_PTR)request,
294  .id = id,
295  .flags = flags,
296  .bits = sizeof(void *) * 8,
297  };
298 #else
300  { (ULONGLONG)(ULONG_PTR)request, id, flags, sizeof(void *) * 8 };
301 #endif
303  OVERLAPPED sync_ovl;
304 
305  TRACE("queue %p, id %s, flags %#x, request %p, size %#x, ret_size %p, ovl %p.\n",
306  queue, wine_dbgstr_longlong(id), flags, request, size, ret_size, ovl);
307 
309  FIXME("Ignoring flags %#x.\n", flags & ~HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY);
310 
311  if (size < sizeof(HTTP_REQUEST_V1))
313 
314  if (!ovl)
315  {
316  sync_ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
317  ovl = &sync_ovl;
318  }
319 
321  ret = GetLastError();
322 
323  if (ovl == &sync_ovl)
324  {
325  ret = ERROR_SUCCESS;
326  if (!GetOverlappedResult(queue, ovl, ret_size, TRUE))
327  ret = GetLastError();
328  CloseHandle(sync_ovl.hEvent);
329  }
330 
331  return ret;
332 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
#define ERROR_SUCCESS
Definition: deptool.c:10
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
Definition: iocompl.c:204
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY
Definition: http.h:46
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
uint32_t ULONG_PTR
Definition: typedefs.h:63
GLenum const GLfloat * params
Definition: glext.h:5645
#define FIXME(fmt,...)
Definition: debug.h:110
HANDLE hEvent
Definition: winbase.h:792
Definition: _queue.h:59
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
uint64_t ULONGLONG
Definition: typedefs.h:65
GLbitfield flags
Definition: glext.h:7161
int ret
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
Definition: tftpd.h:85
unsigned int ULONG
Definition: retypes.h:1
GLenum GLuint id
Definition: glext.h:5579
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define ULONG_PTR
Definition: config.h:101
#define IOCTL_HTTP_RECEIVE_REQUEST
Definition: http.h:28
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

◆ HttpRemoveUrl()

ULONG WINAPI HttpRemoveUrl ( HANDLE  queue,
const WCHAR url 
)

Definition at line 274 of file httpapi_main.c.

275 {
276  TRACE("queue %p, url %s.\n", queue, debugstr_w(url));
277 
278  if (!queue)
280 
281  return remove_url(queue, url);
282 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static ULONG remove_url(HANDLE queue, const WCHAR *urlW)
Definition: httpapi_main.c:250
#define debugstr_w
Definition: kernel32.h:32
Definition: _queue.h:59
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432

◆ HttpRemoveUrlFromUrlGroup()

ULONG WINAPI HttpRemoveUrlFromUrlGroup ( HTTP_URL_GROUP_ID  id,
const WCHAR url,
ULONG  flags 
)

Definition at line 673 of file httpapi_main.c.

674 {
675  struct url_group *group = get_url_group(id);
676 
677  TRACE("id %s, url %s, flags %#x.\n", wine_dbgstr_longlong(id), debugstr_w(url), flags);
678 
679  if (!group->url)
680  return ERROR_FILE_NOT_FOUND;
681 
682  if (flags)
683  FIXME("Ignoring flags %#x.\n", flags);
684 
685  heap_free(group->url);
686  group->url = NULL;
687 
688  if (group->queue)
689  return remove_url(group->queue, url);
690 
691  return ERROR_SUCCESS;
692 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static ULONG remove_url(HANDLE queue, const WCHAR *urlW)
Definition: httpapi_main.c:250
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
GLbitfield flags
Definition: glext.h:7161
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static struct url_group * get_url_group(HTTP_URL_GROUP_ID id)
Definition: httpapi_main.c:494
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ HttpSendHttpResponse()

ULONG WINAPI HttpSendHttpResponse ( HANDLE  queue,
HTTP_REQUEST_ID  id,
ULONG  flags,
HTTP_RESPONSE response,
HTTP_CACHE_POLICY cache_policy,
ULONG ret_size,
void reserved1,
ULONG  reserved2,
OVERLAPPED ovl,
HTTP_LOG_DATA log_data 
)

Definition at line 349 of file httpapi_main.c.

352 {
353  static const char *const header_names[] =
354  {
355  "Cache-Control",
356  "Connection",
357  "Date",
358  "Keep-Alive",
359  "Pragma",
360  "Trailer",
361  "Transfer-Encoding",
362  "Upgrade",
363  "Via",
364  "Warning",
365  "Allow",
366  "Content-Length",
367  "Content-Type",
368  "Content-Encoding",
369  "Content-Language",
370  "Content-Location",
371  "Content-MD5",
372  "Content-Range",
373  "Expires",
374  "Last-Modified",
375  "Accept-Ranges",
376  "Age",
377  "ETag",
378  "Location",
379  "Proxy-Authenticate",
380  "Retry-After",
381  "Server",
382  "Set-Cookie",
383  "Vary",
384  "WWW-Authenticate",
385  };
386 
387  struct http_response *buffer;
388  OVERLAPPED dummy_ovl = {0};
390  int len, body_len = 0;
391  char *p, dummy[12];
392  USHORT i;
393 
394  TRACE("queue %p, id %s, flags %#x, response %p, cache_policy %p, "
395  "ret_size %p, reserved1 %p, reserved2 %#x, ovl %p, log_data %p.\n",
396  queue, wine_dbgstr_longlong(id), flags, response, cache_policy,
397  ret_size, reserved1, reserved2, ovl, log_data);
398 
399  if (flags)
400  FIXME("Unhandled flags %#x.\n", flags);
401  if (response->s.Flags)
402  FIXME("Unhandled response flags %#x.\n", response->s.Flags);
403  if (cache_policy)
404  WARN("Ignoring cache_policy.\n");
405  if (log_data)
406  WARN("Ignoring log_data.\n");
407 
408  len = 12 + sprintf(dummy, "%hu", response->s.StatusCode) + response->s.ReasonLength;
409  for (i = 0; i < response->s.EntityChunkCount; ++i)
410  {
412  {
413  FIXME("Unhandled data chunk type %u.\n", response->s.pEntityChunks[i].DataChunkType);
415  }
416  body_len += response->s.pEntityChunks[i].FromMemory.BufferLength;
417  }
418  len += body_len;
419  for (i = 0; i < HttpHeaderResponseMaximum; ++i)
420  {
421  if (i == HttpHeaderDate)
422  len += 37;
423  else if (response->s.Headers.KnownHeaders[i].RawValueLength)
424  len += strlen(header_names[i]) + 2 + response->s.Headers.KnownHeaders[i].RawValueLength + 2;
425  else if (i == HttpHeaderContentLength)
426  {
427  char dummy[12];
428  len += strlen(header_names[i]) + 2 + sprintf(dummy, "%d", body_len) + 2;
429  }
430  }
431  for (i = 0; i < response->s.Headers.UnknownHeaderCount; ++i)
432  {
433  len += response->s.Headers.pUnknownHeaders[i].NameLength + 2;
434  len += response->s.Headers.pUnknownHeaders[i].RawValueLength + 2;
435  }
436  len += 2;
437 
438  if (!(buffer = heap_alloc(offsetof(struct http_response, buffer[len]))))
439  return ERROR_OUTOFMEMORY;
440  buffer->id = id;
441  buffer->len = len;
442  sprintf(buffer->buffer, "HTTP/1.1 %u %.*s\r\n", response->s.StatusCode,
443  response->s.ReasonLength, response->s.pReason);
444 
445  for (i = 0; i < HttpHeaderResponseMaximum; ++i)
446  {
447  const HTTP_KNOWN_HEADER *header = &response->s.Headers.KnownHeaders[i];
448  if (i == HttpHeaderDate)
449  format_date(buffer->buffer);
450  else if (header->RawValueLength)
451  sprintf(buffer->buffer + strlen(buffer->buffer), "%s: %.*s\r\n",
452  header_names[i], header->RawValueLength, header->pRawValue);
453  else if (i == HttpHeaderContentLength)
454  sprintf(buffer->buffer + strlen(buffer->buffer), "Content-Length: %d\r\n", body_len);
455  }
456  for (i = 0; i < response->s.Headers.UnknownHeaderCount; ++i)
457  {
458  const HTTP_UNKNOWN_HEADER *header = &response->s.Headers.pUnknownHeaders[i];
459  sprintf(buffer->buffer + strlen(buffer->buffer), "%.*s: %.*s\r\n", header->NameLength,
460  header->pName, header->RawValueLength, header->pRawValue);
461  }
462  p = buffer->buffer + strlen(buffer->buffer);
463  /* Don't use strcat, because this might be the end of the buffer. */
464  memcpy(p, "\r\n", 2);
465  p += 2;
466  for (i = 0; i < response->s.EntityChunkCount; ++i)
467  {
468  const HTTP_DATA_CHUNK *chunk = &response->s.pEntityChunks[i];
469  memcpy(p, chunk->FromMemory.pBuffer, chunk->FromMemory.BufferLength);
470  p += chunk->FromMemory.BufferLength;
471  }
472 
473  if (!ovl)
474  ovl = &dummy_ovl;
475 
477  offsetof(struct http_response, buffer[len]), NULL, 0, NULL, ovl))
478  ret = GetLastError();
479 
480  heap_free(buffer);
481  return ret;
482 }
#define ERROR_SUCCESS
Definition: deptool.c:10
USHORT UnknownHeaderCount
Definition: http.h:328
const char * pReason
Definition: http.h:341
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HTTP_UNKNOWN_HEADER * pUnknownHeaders
Definition: http.h:329
#define WARN(fmt,...)
Definition: debug.h:111
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
GLuint buffer
Definition: glext.h:5915
USHORT RawValueLength
Definition: http.h:140
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static void format_date(char *buffer)
Definition: httpapi_main.c:334
#define sprintf(buf, format,...)
Definition: sprintf.c:55
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
USHORT StatusCode
Definition: http.h:339
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: _queue.h:59
smooth NULL
Definition: ftsmooth.c:416
#define offsetof(TYPE, MEMBER)
#define IOCTL_HTTP_SEND_RESPONSE
Definition: http.h:29
#define TRACE(s)
Definition: solgame.cpp:4
uint8_t reserved2[12]
Definition: fsck.fat.h:58
HTTP_RESPONSE_HEADERS Headers
Definition: http.h:342
GLbitfield flags
Definition: glext.h:7161
int ret
HTTP_DATA_CHUNK_TYPE DataChunkType
Definition: http.h:233
struct _HTTP_DATA_CHUNK::@2879::@2880 FromMemory
USHORT EntityChunkCount
Definition: http.h:343
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
HTTP_RESPONSE_V1 s
Definition: http.h:371
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
unsigned short USHORT
Definition: pedump.c:61
USHORT ReasonLength
Definition: http.h:340
HTTP_DATA_CHUNK * pEntityChunks
Definition: http.h:344
USHORT NameLength
Definition: http.h:132
unsigned int ULONG
Definition: retypes.h:1
GLenum GLuint id
Definition: glext.h:5579
ULONG Flags
Definition: http.h:337
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
GLfloat GLfloat p
Definition: glext.h:8902
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
USHORT RawValueLength
Definition: http.h:133
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
HTTP_KNOWN_HEADER KnownHeaders[HttpHeaderResponseMaximum]
Definition: http.h:332

◆ HttpSetServiceConfiguration()

ULONG WINAPI HttpSetServiceConfiguration ( HANDLE  ,
HTTP_SERVICE_CONFIG_ID  ,
PVOID  ,
ULONG  ,
LPOVERLAPPED   
)

Definition at line 180 of file httpapi_main.c.

182 {
183  FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
184  return NO_ERROR;
185 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define NO_ERROR
Definition: dderror.h:5
#define FIXME(fmt,...)
Definition: debug.h:110
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
Definition: sock.c:82

◆ HttpSetUrlGroupProperty()

ULONG WINAPI HttpSetUrlGroupProperty ( HTTP_URL_GROUP_ID  id,
HTTP_SERVER_PROPERTY  property,
void value,
ULONG  length 
)

Definition at line 619 of file httpapi_main.c.

620 {
621  struct url_group *group = get_url_group(id);
622  const HTTP_BINDING_INFO *info = value;
623 
624  TRACE("id %s, property %u, value %p, length %u.\n",
626 
628  {
629  FIXME("Unhandled property %u.\n", property);
631  }
632 
633  TRACE("Binding to queue %p.\n", info->RequestQueueHandle);
634 
635  group->queue = info->RequestQueueHandle;
636 
637  if (group->url)
638  add_url(group->queue, group->url, group->context);
639 
640  return ERROR_SUCCESS;
641 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static ULONG add_url(HANDLE queue, const WCHAR *urlW, HTTP_URL_CONTEXT context)
Definition: httpapi_main.c:217
#define FIXME(fmt,...)
Definition: debug.h:110
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
GLsizei const GLfloat * value
Definition: glext.h:6069
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
static struct url_group * get_url_group(HTTP_URL_GROUP_ID id)
Definition: httpapi_main.c:494

◆ HttpTerminate()

ULONG WINAPI HttpTerminate ( ULONG  flags,
void reserved 
)