LPWSTR proxy_username;
LPWSTR proxy_password;
struct list cookie_cache;
+ HANDLE unload_event;
} session_t;
typedef struct
BOOL is_request; /* part of request headers? */
} header_t;
+enum auth_target
+{
+ TARGET_INVALID = -1,
+ TARGET_SERVER,
+ TARGET_PROXY,
+ TARGET_MAX
+};
+
enum auth_scheme
{
SCHEME_INVALID = -1,
SCHEME_NTLM,
SCHEME_PASSPORT,
SCHEME_DIGEST,
- SCHEME_NEGOTIATE
+ SCHEME_NEGOTIATE,
+ SCHEME_MAX
};
struct authinfo
BOOL read_chunked_size; /* chunk size remaining */
DWORD read_pos; /* current read position in read_buf */
DWORD read_size; /* valid data size in read_buf */
- char read_buf[4096]; /* buffer for already read but not returned data */
+ char read_buf[8192]; /* buffer for already read but not returned data */
header_t *headers;
DWORD num_headers;
WCHAR **accept_types;
DWORD num_accept_types;
struct authinfo *authinfo;
struct authinfo *proxy_authinfo;
+ HANDLE task_wait;
+ HANDLE task_cancel;
+ HANDLE task_thread;
+ struct list task_queue;
+ CRITICAL_SECTION task_cs;
+ struct
+ {
+ WCHAR *username;
+ WCHAR *password;
+ } creds[TARGET_MAX][SCHEME_MAX];
} request_t;
typedef struct _task_header_t task_header_t;
struct _task_header_t
{
+ struct list entry;
request_t *request;
void (*proc)( task_header_t * );
};
void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN;
extern HRESULT WinHttpRequest_create( void ** ) DECLSPEC_HIDDEN;
+void release_typelib( void ) DECLSPEC_HIDDEN;
static inline void *heap_alloc( SIZE_T size )
{
return dst;
}
+static inline char *strdupWA_sized( const WCHAR *src, DWORD size )
+{
+ char *dst = NULL;
+ if (src)
+ {
+ int len = WideCharToMultiByte( CP_ACP, 0, src, size, NULL, 0, NULL, NULL ) + 1;
+ if ((dst = heap_alloc( len )))
+ {
+ WideCharToMultiByte( CP_ACP, 0, src, len, dst, size, NULL, NULL );
+ dst[len - 1] = 0;
+ }
+ }
+ return dst;
+}
+
#endif /* _WINE_WINHTTP_PRIVATE_H_ */