From 4cd38b4829880d2ff08135156fa6069b49e477d7 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 13 Jul 2004 23:34:28 +0000 Subject: [PATCH] Accept headers without \r\n ending in HttpAddRequestHeaders. --- dlls/wininet/http.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index fc266c0bbb7..21793b5cc80 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -122,16 +122,19 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, lpszEnd++; } - if (*lpszEnd == '\0') + if (*lpszStart == '\0') break; - *lpszEnd = '\0'; - + if (*lpszEnd == '\r') + { + *lpszEnd = '\0'; + lpszEnd += 2; /* Jump over \r\n */ + } TRACE("interpreting header %s\n", debugstr_w(lpszStart)); if (HTTP_InterpretHttpHeader(lpszStart, field, MAX_FIELD_LEN, value, MAX_FIELD_VALUE_LEN)) bSuccess = HTTP_ProcessHeader(lpwhr, field, value, dwModifier | HTTP_ADDHDR_FLAG_REQ); - lpszStart = lpszEnd + 2; /* Jump over \0\n */ + lpszStart = lpszEnd; } while (bSuccess);