Commit 18a31e49 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Pass arguments as substrings to set_cookie.

parent 8fe7be58
......@@ -773,7 +773,7 @@ static void HTTP_ProcessCookies( http_request_t *request )
while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1)
{
const WCHAR *data;
WCHAR *name;
substr_t name;
setCookieHeader = &request->custHeaders[HeaderIndex];
......@@ -784,13 +784,9 @@ static void HTTP_ProcessCookies( http_request_t *request )
if(!data)
continue;
name = heap_strndupW(setCookieHeader->lpszValue, data-setCookieHeader->lpszValue);
if(!name)
continue;
name = substr(setCookieHeader->lpszValue, data - setCookieHeader->lpszValue);
data++;
set_cookie(request->server->name, request->path, name, data, INTERNET_COOKIE_HTTPONLY);
heap_free(name);
set_cookie(substrz(request->server->name), substrz(request->path), name, substrz(data), INTERNET_COOKIE_HTTPONLY);
}
LeaveCriticalSection( &request->headers_section );
......
......@@ -435,7 +435,7 @@ DWORD HTTP_Connect(appinfo_t*,LPCWSTR,
BOOL GetAddress(const WCHAR*,INTERNET_PORT,SOCKADDR*,int*,char*) DECLSPEC_HIDDEN;
DWORD get_cookie_header(const WCHAR*,const WCHAR*,WCHAR**) DECLSPEC_HIDDEN;
DWORD set_cookie(const WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*,DWORD) DECLSPEC_HIDDEN;
DWORD set_cookie(substr_t,substr_t,substr_t,substr_t,DWORD) DECLSPEC_HIDDEN;
void INTERNET_SetLastError(DWORD dwError) DECLSPEC_HIDDEN;
DWORD INTERNET_GetLastError(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