Commit 66af8b5f authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

Strip dangling \r\n from HTTP_HttpSendRequest.

parent e2f850e4
...@@ -1532,6 +1532,15 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -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 we don't have a path we set it to root */
if (NULL == lpwhr->lpszPath) if (NULL == lpwhr->lpszPath)
lpwhr->lpszPath = WININET_strdupW(szSlash); 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, if(CSTR_EQUAL != CompareStringW( LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
lpwhr->lpszPath, strlenW(szHttp), szHttp, strlenW(szHttp) ) lpwhr->lpszPath, strlenW(szHttp), szHttp, strlenW(szHttp) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment