18 #ifdef _HTTP_BUILD_AMT
19 #define CMSI_HTTPCLIENT_PROTOCOL_GUID {0x471b2c0e, 0x6137, 0x4d55, 0x92, 0x36, 0xdd, 0x0f, 0xdb, 0xc2, 0x52, 0xfb}
26 #define HTTP_CLIENT_VERSION_MINOR 0
27 #define HTTP_CLIENT_VERSION_MAJOR 1
30 #define HTTP_CLIENT_MAX_SEND_RECV_HEADERS 1024 // Maximum Send and receive buffers size
31 #define HTTP_CLIENT_INIT_SEND_RECV_HEADERS 2048 // If we can resize the buffers this would be the initial size
33 #define HTTP_CLIENT_MAX_USERNAME_LENGTH 16 // Maximum length the user name (host and proxy authentication)
34 #define HTTP_CLIENT_MAX_PASSWORD_LENGTH 16 // Maximum length for the password
36 #define HTTP_CLIENT_MAX_64_ENCODED_CRED ((HTTP_CLIENT_MAX_USERNAME_LENGTH + HTTP_CLIENT_MAX_PASSWORD_LENGTH) * 2) + 4
37 #define HTTP_CLIENT_MAX_CHUNK_HEADER 64 // Maximum length for the received chunk header (hex - string) size
38 #define HTTP_CLIENT_MAX_PROXY_HOST_LENGTH 64 // Maximum length for the proxy host name
39 #define HTTP_CLIENT_MAX_TOKEN_LENGTH 512 // Maximum length for an HTTP token data (authentication header elements)
40 #define HTTP_CLIENT_MAX_TOKEN_NAME_LENGTH 32 // Maximum length for an HTTP authorization token name ("qop")
41 #define HTTP_CLIENT_MAX_HEADER_SEARCH_CLUE 1024 // Maximum length for a search clue string (Headers searching)
42 #define HTTP_CLIENT_ALLOW_HEAD_VERB 0 // Can we use the HTTP HEAD verb in our outgoing requests?
44 #define HTTP_CLIENT_MEMORY_RESIZABLE FALSE // Permission to dynamically resize the headers buffer
45 #define HTTP_CLIENT_MEMORY_RESIZE_FACTOR 16 // Factor for memory resizing operation
47 #define HTTP_CLIENT_DEFAULT_PORT 80 // Default HTTP port
48 #define HTTP_CLIENT_DEFAULT_SSL_PORT 443 // Default HTTPS port
49 #define HTTP_CLIENT_DEFAULT_VERB 0 // GET
50 #define HTTP_CLIENT_DEFAULT_VER "HTTP/1.1" // We will send this in the outgoing header
51 #define HTTP_CLIENT_DEFAULT_PROXY_VER "HTTP/1.0" // We will send this in the outgoing header (proxy)
52 #define HTTP_CLIENT_DEFAULT_AGENT "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
53 #define HTTP_CLIENT_DEFAULT_TIMEOUT 30 // Default timeout in seconds
54 #define HTTP_CLIENT_DEFAULT_KEEP_ALIVE 30 // Default Keep-alive value in seconds
55 #define HTTP_CLIENT_DEFAULT_DIGEST_AUTH "MD5" // This is for bypassing a known bug in AMT05..
56 #define HTTP_CLIENT_DEFAULT_PROXY_AUTH 1 // Basic
58 #define HTTP_CLIENT_CRLF "\r\n" // End of line macro
59 #define HTTP_CLIENT_CRLFX2 "\r\n\r\n" // Double End of line macro
63 #define HTTP_CLIENT_FLAG_SECURE 0x00000010 // The session is secured using TLS
64 #define HTTP_CLIENT_FLAG_URLANDPORT 0x00000020 // Url has a port within
65 #define HTTP_CLIENT_FLAG_URLHTTPS 0x00000040 // Url has a https prefix
66 #define HTTP_CLIENT_FLAG_USINGPROXY 0x00000080 // Operation will be performed using a proxy server
67 #define HTTP_CLIENT_FLAG_CHUNKED 0x00000100 // The incoming data is chunked
70 #define HTTP_STATUS_OK 200 // The request has succeeded
71 #define HTTP_STATUS_UNAUTHORIZED 401 // The request requires user authentic
72 #define HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED 407 // The client must first authenticate itself with the proxy
75 #define HTTP_STATUS_OBJECT_MOVED 302 // Page redirection notification
76 #define HTTP_STATUS_OBJECT_MOVED_PERMANENTLY 301 // Page redirection notification
77 #define HTTP_STATUS_CONTINUE 100 // Page continue message
81 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
82 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
84 #define HTTP_TIMEOUT(nTimeout) (((nTimeout) > (0)) ? (nTimeout) : (HTTP_CLIENT_DEFAULT_TIMEOUT))
87 #define ALIGN(size) ((size & 0xfffffffc) + ((size & 3) ? 4 : 0))
90 #ifdef _HTTP_DEBUGGING_
91 typedef VOID _stdcall E_HTTPDebug(
const char *,
const char*,
UINT32,
char *,...);
229 #ifdef _HTTP_DEBUGGING_
267 #ifdef _HTTP_DEBUGGING_
268 UINT32 HTTPClientSetDebugHook (HTTP_SESSION_HANDLE pSession,E_HTTPDebug *pDebug);
306 #endif //_HTTP_CLIENT