Mike Kaplinskiy : wininet: Make \r and \n valid header separators.
Alexandre Julliard
julliard at winehq.org
Tue Jun 16 09:09:38 CDT 2009
Module: wine
Branch: master
Commit: 6c767c4e2ca1da1f1f7f678a9034ce99b0caf1f6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c767c4e2ca1da1f1f7f678a9034ce99b0caf1f6
Author: Mike Kaplinskiy <mike.kaplinskiy at gmail.com>
Date: Sun Jun 14 18:29:31 2009 -0400
wininet: Make \r and \n valid header separators.
---
dlls/wininet/http.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 2721427..1922835 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')
More information about the wine-cvs
mailing list