Munge /r and /n in HTTP_HttpSendRequestA

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sun Mar 14 18:41:08 CST 2004


       Changelog:
       wine/dlls/wininet/http.c: HTTP_HttpSendRequestA()
       Munge /r and /n at end from lpwhr->lpszPath

This makes Xilinx webupdate.exe see the Servicepack 
-- 
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.49
diff -u -r1.49 http.c
--- wine/dlls/wininet/http.c	9 Feb 2004 22:07:43 -0000	1.49
+++ wine/dlls/wininet/http.c	15 Mar 2004 00:25:54 -0000
@@ -1348,7 +1348,16 @@
         /* If we don't have a path we set it to root */
         if (NULL == lpwhr->lpszPath)
             lpwhr->lpszPath = WININET_strdup("/");
-
+	else
+	    /* remove \r and \n*/
+	{
+	    int nLen = strlen(lpwhr->lpszPath);
+	    while ((lpwhr->lpszPath[nLen-1] == '\r')||(lpwhr->lpszPath[nLen-1] == '\n'))
+	    {
+		nLen--;
+		lpwhr->lpszPath[nLen]='\0';
+	    }
+	}
         if(strncmp(lpwhr->lpszPath, "http://", sizeof("http://") -1) != 0
            && lpwhr->lpszPath[0] != '/') /* not an absolute path ?? --> fix it !! */
         {



More information about the wine-patches mailing list