From 25efbc9dbcce49694149e5957e9d5a110f1e3922 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Tue, 16 Mar 2004 01:06:30 +0000 Subject: [PATCH] HTTP_HttpSendRequestA: Remove \r and \n at the end of lpwhr->lpszPath. --- dlls/wininet/http.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 0d6f748fc5c..1f5dcf315c6 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1348,7 +1348,12 @@ BOOL WINAPI HTTP_HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders, /* 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 ((nLen > 0) && ((lpwhr->lpszPath[nLen-1] == '\r')||(lpwhr->lpszPath[nLen-1] == '\n'))) + lpwhr->lpszPath[--nLen]='\0'; + } if(strncmp(lpwhr->lpszPath, "http://", sizeof("http://") -1) != 0 && lpwhr->lpszPath[0] != '/') /* not an absolute path ?? --> fix it !! */ {