Commit 080dfbee authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Explicitly pass errors.

parent af5f9e6d
......@@ -319,10 +319,11 @@ end:
return ret;
}
BOOL add_cookie_headers( struct request *request )
DWORD add_cookie_headers( struct request *request )
{
struct list *domain_cursor;
struct session *session = request->connect->session;
DWORD ret = ERROR_SUCCESS;
EnterCriticalSection( &session->cs );
......@@ -351,7 +352,7 @@ BOOL add_cookie_headers( struct request *request )
if (!(header = heap_alloc( (len + 1) * sizeof(WCHAR) )))
{
LeaveCriticalSection( &session->cs );
return FALSE;
return ERROR_OUTOFMEMORY;
}
memcpy( header, cookieW, len_cookie * sizeof(WCHAR) );
......@@ -363,8 +364,8 @@ BOOL add_cookie_headers( struct request *request )
}
TRACE("%s\n", debugstr_w(header));
add_request_headers( request, header, len,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON );
ret = add_request_headers( request, header, len,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON );
heap_free( header );
}
}
......@@ -372,5 +373,5 @@ BOOL add_cookie_headers( struct request *request )
}
LeaveCriticalSection( &session->cs );
return TRUE;
return ret;
}
......@@ -1063,7 +1063,7 @@ static BOOL add_accept_types_header( struct request *request, const WCHAR **type
if (!types) return TRUE;
while (*types)
{
if (!process_header( request, L"Accept", *types, flags, TRUE )) return FALSE;
if (process_header( request, L"Accept", *types, flags, TRUE )) return FALSE;
types++;
}
return TRUE;
......
......@@ -256,27 +256,27 @@ void send_callback( struct object_header *, DWORD, LPVOID, DWORD ) DECLSPEC_HIDD
void close_connection( struct request * ) DECLSPEC_HIDDEN;
void netconn_close( struct netconn * ) DECLSPEC_HIDDEN;
struct netconn *netconn_create( struct hostdata *, const struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
DWORD netconn_create( struct hostdata *, const struct sockaddr_storage *, int, struct netconn ** ) DECLSPEC_HIDDEN;
void netconn_unload( void ) DECLSPEC_HIDDEN;
ULONG netconn_query_data_available( struct netconn * ) DECLSPEC_HIDDEN;
BOOL netconn_recv( struct netconn *, void *, size_t, int, int * ) DECLSPEC_HIDDEN;
BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
BOOL netconn_secure_connect( struct netconn *, WCHAR *, DWORD, CredHandle *, BOOL ) DECLSPEC_HIDDEN;
BOOL netconn_send( struct netconn *, const void *, size_t, int * ) DECLSPEC_HIDDEN;
DWORD netconn_recv( struct netconn *, void *, size_t, int, int * ) DECLSPEC_HIDDEN;
DWORD netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
DWORD netconn_secure_connect( struct netconn *, WCHAR *, DWORD, CredHandle *, BOOL ) DECLSPEC_HIDDEN;
DWORD netconn_send( struct netconn *, const void *, size_t, int * ) DECLSPEC_HIDDEN;
DWORD netconn_set_timeout( struct netconn *, BOOL, int ) DECLSPEC_HIDDEN;
BOOL netconn_is_alive( struct netconn * ) DECLSPEC_HIDDEN;
const void *netconn_get_certificate( struct netconn * ) DECLSPEC_HIDDEN;
int netconn_get_cipher_strength( struct netconn * ) DECLSPEC_HIDDEN;
BOOL set_cookies( struct request *, const WCHAR * ) DECLSPEC_HIDDEN;
BOOL add_cookie_headers( struct request * ) DECLSPEC_HIDDEN;
BOOL add_request_headers( struct request *, const WCHAR *, DWORD, DWORD ) DECLSPEC_HIDDEN;
DWORD add_cookie_headers( struct request * ) DECLSPEC_HIDDEN;
DWORD add_request_headers( struct request *, const WCHAR *, DWORD, DWORD ) DECLSPEC_HIDDEN;
void destroy_cookies( struct session * ) DECLSPEC_HIDDEN;
BOOL set_server_for_hostname( struct connect *, const WCHAR *, INTERNET_PORT ) DECLSPEC_HIDDEN;
void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN;
void release_host( struct hostdata * ) DECLSPEC_HIDDEN;
BOOL process_header( struct request *, const WCHAR *, const WCHAR *, DWORD, BOOL ) DECLSPEC_HIDDEN;
DWORD process_header( struct request *, const WCHAR *, const WCHAR *, DWORD, BOOL ) DECLSPEC_HIDDEN;
extern HRESULT WinHttpRequest_create( void ** ) DECLSPEC_HIDDEN;
void release_typelib( void ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment