From 6c767c4e2ca1da1f1f7f678a9034ce99b0caf1f6 Mon Sep 17 00:00:00 2001 From: Mike Kaplinskiy Date: Sun, 14 Jun 2009 18:29:31 -0400 Subject: [PATCH] wininet: Make \r and \n valid header separators. --- dlls/wininet/http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 27214278e0a..1922835e2a4 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -741,7 +741,7 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, while (*lpszEnd != '\0') { - if (*lpszEnd == '\r' && *(lpszEnd + 1) == '\n') + if (*lpszEnd == '\r' || *lpszEnd == '\n') break; lpszEnd++; } @@ -749,10 +749,10 @@ static BOOL HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, if (*lpszStart == '\0') break; - if (*lpszEnd == '\r') + if (*lpszEnd == '\r' || *lpszEnd == '\n') { *lpszEnd = '\0'; - lpszEnd += 2; /* Jump over \r\n */ + lpszEnd++; /* Jump over newline */ } TRACE("interpreting header %s\n", debugstr_w(lpszStart)); if (*lpszStart == '\0')