Author: cgutman Date: Sun Jun 5 21:39:34 2011 New Revision: 52105
URL: http://svn.reactos.org/svn/reactos?rev=52105&view=rev Log: [WINHTTP] - Sync to wine 1.3.21
Modified: trunk/reactos/dll/win32/winhttp/net.c trunk/reactos/dll/win32/winhttp/request.c trunk/reactos/dll/win32/winhttp/url.c trunk/reactos/dll/win32/winhttp/winhttp_private.h
Modified: trunk/reactos/dll/win32/winhttp/net.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/net.c?rev... ============================================================================== --- trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] Sun Jun 5 21:39:34 2011 @@ -134,6 +134,7 @@ MAKE_FUNCPTR( ERR_get_error ); MAKE_FUNCPTR( ERR_error_string ); MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data ); +MAKE_FUNCPTR( X509_STORE_CTX_get_chain ); MAKE_FUNCPTR( i2d_X509 ); MAKE_FUNCPTR( sk_value ); MAKE_FUNCPTR( sk_num ); @@ -374,13 +375,14 @@ X509 *cert; int i; PCCERT_CONTEXT endCert = NULL; + struct stack_st *chain = (struct stack_st *)pX509_STORE_CTX_get_chain( ctx );
ret = TRUE; - for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++) + for (i = 0; ret && i < psk_num(chain); i++) { PCCERT_CONTEXT context;
- cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i); + cert = (X509 *)psk_value(chain, i); if ((context = X509_to_cert_context( cert ))) { if (i == 0) @@ -488,6 +490,7 @@ LOAD_FUNCPTR( ERR_get_error ); LOAD_FUNCPTR( ERR_error_string ); LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data ); + LOAD_FUNCPTR( X509_STORE_CTX_get_chain ); LOAD_FUNCPTR( i2d_X509 ); LOAD_FUNCPTR( sk_value ); LOAD_FUNCPTR( sk_num );
Modified: trunk/reactos/dll/win32/winhttp/request.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/request.c... ============================================================================== --- trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] Sun Jun 5 21:39:34 2011 @@ -504,7 +504,7 @@ sprintfW( ret, fmt, scheme, request->connect->hostname ); if (request->connect->hostport) { - static const WCHAR colonFmt[] = { ':','%','d',0 }; + static const WCHAR colonFmt[] = { ':','%','u',0 };
sprintfW( ret + strlenW( ret ), colonFmt, request->connect->hostport ); @@ -870,7 +870,7 @@ static BOOL secure_proxy_connect( request_t *request ) { static const WCHAR verbConnect[] = {'C','O','N','N','E','C','T',0}; - static const WCHAR fmt[] = {'%','s',':','%','d',0}; + static const WCHAR fmt[] = {'%','s',':','%','u',0}; BOOL ret = FALSE; LPWSTR path; connect_t *connect = request->connect; @@ -1837,7 +1837,7 @@
if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES)) record_cookies( request );
- if (status == 301 || status == 302) + if (status == HTTP_STATUS_MOVED || status == HTTP_STATUS_REDIRECT || status == HTTP_STATUS_REDIRECT_KEEP_VERB) { if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break;
Modified: trunk/reactos/dll/win32/winhttp/url.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/url.c?rev... ============================================================================== --- trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] Sun Jun 5 21:39:34 2011 @@ -299,7 +299,7 @@
static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len ) { - static const WCHAR formatW[] = {'%','d',0}; + static const WCHAR formatW[] = {'%','u',0}; INTERNET_SCHEME scheme;
*len = 0; @@ -360,7 +360,7 @@ */ BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDWORD required ) { - static const WCHAR formatW[] = {'%','d',0}; + static const WCHAR formatW[] = {'%','u',0}; static const WCHAR twoslashW[] = {'/','/'};
DWORD len;
Modified: trunk/reactos/dll/win32/winhttp/winhttp_private.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/winhttp_p... ============================================================================== --- trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] Sun Jun 5 21:39:34 2011 @@ -204,38 +204,38 @@ LPDWORD written; } write_data_t;
-object_header_t *addref_object( object_header_t * ); -object_header_t *grab_object( HINTERNET ); -void release_object( object_header_t * ); -HINTERNET alloc_handle( object_header_t * ); -BOOL free_handle( HINTERNET ); - -void set_last_error( DWORD ); -DWORD get_last_error( void ); -void send_callback( object_header_t *, DWORD, LPVOID, DWORD ); -void close_connection( request_t * ); - -BOOL netconn_close( netconn_t * ); -BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ); -BOOL netconn_connected( netconn_t * ); -BOOL netconn_create( netconn_t *, int, int, int ); -BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ); -BOOL netconn_init( netconn_t *, BOOL ); -void netconn_unload( void ); -BOOL netconn_query_data_available( netconn_t *, DWORD * ); -BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ); -BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int ); -BOOL netconn_secure_connect( netconn_t *, WCHAR * ); -BOOL netconn_send( netconn_t *, const void *, size_t, int, int * ); -DWORD netconn_set_timeout( netconn_t *, BOOL, int ); -const void *netconn_get_certificate( netconn_t * ); -int netconn_get_cipher_strength( netconn_t * ); - -BOOL set_cookies( request_t *, const WCHAR * ); -BOOL add_cookie_headers( request_t * ); -BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ); -void delete_domain( domain_t * ); -BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ); +object_header_t *addref_object( object_header_t * ) DECLSPEC_HIDDEN; +object_header_t *grab_object( HINTERNET ) DECLSPEC_HIDDEN; +void release_object( object_header_t * ) DECLSPEC_HIDDEN; +HINTERNET alloc_handle( object_header_t * ) DECLSPEC_HIDDEN; +BOOL free_handle( HINTERNET ) DECLSPEC_HIDDEN; + +void set_last_error( DWORD ) DECLSPEC_HIDDEN; +DWORD get_last_error( void ) DECLSPEC_HIDDEN; +void send_callback( object_header_t *, DWORD, LPVOID, DWORD ) DECLSPEC_HIDDEN; +void close_connection( request_t * ) DECLSPEC_HIDDEN; + +BOOL netconn_close( netconn_t * ) DECLSPEC_HIDDEN; +BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ) DECLSPEC_HIDDEN; +BOOL netconn_connected( netconn_t * ) DECLSPEC_HIDDEN; +BOOL netconn_create( netconn_t *, int, int, int ) DECLSPEC_HIDDEN; +BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ) DECLSPEC_HIDDEN; +BOOL netconn_init( netconn_t *, BOOL ) DECLSPEC_HIDDEN; +void netconn_unload( void ) DECLSPEC_HIDDEN; +BOOL netconn_query_data_available( netconn_t *, DWORD * ) DECLSPEC_HIDDEN; +BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ) DECLSPEC_HIDDEN; +BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int ) DECLSPEC_HIDDEN; +BOOL netconn_secure_connect( netconn_t *, WCHAR * ) DECLSPEC_HIDDEN; +BOOL netconn_send( netconn_t *, const void *, size_t, int, int * ) DECLSPEC_HIDDEN; +DWORD netconn_set_timeout( netconn_t *, BOOL, int ) DECLSPEC_HIDDEN; +const void *netconn_get_certificate( netconn_t * ) DECLSPEC_HIDDEN; +int netconn_get_cipher_strength( netconn_t * ) DECLSPEC_HIDDEN; + +BOOL set_cookies( request_t *, const WCHAR * ) DECLSPEC_HIDDEN; +BOOL add_cookie_headers( request_t * ) DECLSPEC_HIDDEN; +BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ) DECLSPEC_HIDDEN; +void delete_domain( domain_t * ) DECLSPEC_HIDDEN; +BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ) DECLSPEC_HIDDEN;
static inline void *heap_alloc( SIZE_T size ) {