http.c: handle HTTP_QUERY_CUSTOM
Aric Stewart
aric at codeweavers.com
Wed Dec 7 11:08:22 CST 2005
in HttpQueryInfo if dwInfoLevel includes HTTP_QUERY_CUSTOM then lpBuffer
is In/Out because the header we are querying is there. Additionally
standard headers can be queried in this manner as well (such as Set-Cookie)
-------------- next part --------------
Index: dlls/wininet/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/http.c,v
retrieving revision 1.132
diff -u -r1.132 http.c
--- dlls/wininet/http.c 3 Dec 2005 18:35:15 -0000 1.132
+++ dlls/wininet/http.c 7 Dec 2005 17:01:23 -0000
@@ -1161,9 +1161,15 @@
INT index = HTTP_GetCustomHeaderIndex(lpwhr, (LPWSTR)lpBuffer);
if (index < 0)
+ index = HTTP_GetStdHeaderIndex(lpBuffer);
+ else
+ lphttpHdr = &lpwhr->pCustHeaders[index];
+
+ if (index < 0)
return bSuccess;
+ else
+ lphttpHdr = &lpwhr->StdHeaders[index];
- lphttpHdr = &lpwhr->pCustHeaders[index];
}
else
{
@@ -1475,6 +1481,9 @@
len = (*lpdwBufferLength)*sizeof(WCHAR);
bufferW = HeapAlloc( GetProcessHeap(), 0, len );
+ /* buffer is in/out because of HTTP_QUERY_CUSTOM */
+ if (dwInfoLevel & HTTP_QUERY_CUSTOM)
+ MultiByteToWideChar(CP_ACP,0,lpBuffer,-1,bufferW,len);
result = HttpQueryInfoW( hHttpRequest, dwInfoLevel, bufferW,
&len, lpdwIndex );
if( result )
More information about the wine-patches
mailing list