aboutsummaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorPacketVideo CM <engbuild@pv.com>2009-10-13 22:40:36 -0700
committerPacketVideo CM <engbuild@pv.com>2009-10-13 22:40:36 -0700
commit3a5099334cb880ebfa79f76ac3417468bb2ed6b1 (patch)
treecbd14d90c1c6e60dbe9a314bde284a1a712028d9 /protocols
parent6a5dec47828c6fccbd1dd7e792f555b5bcb69d76 (diff)
downloadopencore-3a5099334cb880ebfa79f76ac3417468bb2ed6b1.tar.gz
RIO-7715: Add an extra condition for the multi-line check in an HTTP response header
Diffstat (limited to 'protocols')
-rw-r--r--protocols/http_parcom/src/http_parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/http_parcom/src/http_parser.cpp b/protocols/http_parcom/src/http_parser.cpp
index 87e9c39a7..28b835aca 100644
--- a/protocols/http_parcom/src/http_parser.cpp
+++ b/protocols/http_parcom/src/http_parser.cpp
@@ -766,8 +766,10 @@ int32 HTTPParserInput::checkNextLine(HTTPMemoryFragment &aInputDataStream)
else if (*ptr == HTTP_CHAR_CR || *ptr == HTTP_CHAR_LF)
{
// Check for header over multiple lines, header will be divided over multiple header if
- // ptr[0] and ptr[1] points either CR or LF and ptr[2] points to either SPACE or TAB
- if (streamLength > 2 && (ptr[2] == HTTP_CHAR_SPACE || ptr[2] == HTTP_CHAR_TAB))
+ // ptr[0] and ptr[1] points either CR or LF and ptr[2] points to either SPACE or TAB,
+ // but make sure that the header starts with non-CR or non-LF character
+ if ((*start_ptr != HTTP_CHAR_CR && *start_ptr != HTTP_CHAR_LF) &&
+ (streamLength > 2 && (ptr[2] == HTTP_CHAR_SPACE || ptr[2] == HTTP_CHAR_TAB)))
{
ptr += 2; // ptr increase by 2, One for CR and second for LF
streamLength -= 2;