Fix Length Return from HttpQueryInfoA
Robert Shearman
rob at codeweavers.com
Mon Jul 19 08:22:52 CDT 2004
Hi,
HttpQueryInfoA doesn't return the length for strings needed and so apps
cannot currently get string data. This patch fixes the function.
P.S. This patch applies independently (with some fuzz) of the other
wininet patches, including Mike's refcounting patch.
Rob
Changelog:
Fix string length return from HttpQueryInfoA.
-------------- next part --------------
Index: wine/dlls/wininet/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/http.c,v
retrieving revision 1.68
diff -u -r1.68 http.c
--- wine/dlls/wininet/http.c 16 Jul 2004 19:15:40 -0000 1.68
+++ wine/dlls/wininet/http.c 19 Jul 2004 13:17:59 -0000
@@ -1211,6 +1211,12 @@
lpBuffer, *lpdwBufferLength, NULL, NULL );
*lpdwBufferLength = len * sizeof(WCHAR);
}
+ else
+ /* since the strings being returned from HttpQueryInfoW should be
+ * only ASCII characters, it is reasonable to assume that all of
+ * the Unicode characters can be reduced to a single byte */
+ *lpdwBufferLength = len / sizeof(WCHAR);
+
HeapFree(GetProcessHeap(), 0, bufferW );
return result;
More information about the wine-patches
mailing list