Strip dangling \r\n from HTTP_HttpSendRequest
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Sep 6 03:15:11 CDT 2004
Changelog:
dlls/wininet/http.c: HTTP_HttpSendRequestW
Strip dangling /r and /n at end from lpwhr->lpszPath
Some request from XILINX ISE webupdate is malformed and wine aborts on this
construct
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/wininet/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/http.c,v
retrieving revision 1.78
diff -u -r1.78 http.c
--- wine/dlls/wininet/http.c 3 Sep 2004 18:30:28 -0000 1.78
+++ wine/dlls/wininet/http.c 5 Sep 2004 20:15:39 -0000
@@ -1533,7 +1533,17 @@
if (NULL == lpwhr->lpszPath)
lpwhr->lpszPath = WININET_strdupW(szSlash);
- if(CSTR_EQUAL != CompareStringW( LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
+ else
+ /* remove \r and \n*/
+ {
+ int nLen = strlenW(lpwhr->lpszPath);
+ while ((nLen >0 ) && ((lpwhr->lpszPath[nLen-1] == '\r')||(lpwhr->lpszPath[nLen-1] == '\n')))
+ {
+ nLen--;
+ lpwhr->lpszPath[nLen]='\0';
+ }
+ }
+ if(CSTR_EQUAL != CompareStringW( LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
lpwhr->lpszPath, strlenW(szHttp), szHttp, strlenW(szHttp) )
&& lpwhr->lpszPath[0] != '/') /* not an absolute path ?? --> fix it !! */
{
More information about the wine-patches
mailing list