HTTP_HttpSendRequestA: Remove \r and \n at the end of

lpwhr->lpszPath.
This commit is contained in:
Uwe Bonnes 2004-03-16 01:06:30 +00:00 committed by Alexandre Julliard
parent 9063cefec5
commit 25efbc9dbc
1 changed files with 6 additions and 1 deletions

View File

@ -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 !! */
{