From 66af8b5f60befb0055663e21e6f7d7aafa708ee5 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 10 Sep 2004 21:11:22 +0000 Subject: [PATCH] Strip dangling \r\n from HTTP_HttpSendRequest. --- dlls/wininet/http.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 5c9f6bdbca1..f1dab8d808f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1532,6 +1532,15 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, /* If we don't have a path we set it to root */ if (NULL == lpwhr->lpszPath) lpwhr->lpszPath = WININET_strdupW(szSlash); + 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) ) -- 2.11.4.GIT