Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1838)

Unified Diff: Source/modules/websockets/WebSocketHandshake.cpp

Issue 314083002: parseHTTPHeaders should return the number of consumed bytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@async-initializer
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/network/HTTPParsers.cpp » ('j') | Source/platform/network/HTTPRequest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/WebSocketHandshake.cpp
diff --git a/Source/modules/websockets/WebSocketHandshake.cpp b/Source/modules/websockets/WebSocketHandshake.cpp
index 5b920aff4d0c4fc578b2d93fbf5699731da9016a..84d97869282f2c3124d149da30945719a3242604 100644
--- a/Source/modules/websockets/WebSocketHandshake.cpp
+++ b/Source/modules/websockets/WebSocketHandshake.cpp
@@ -452,7 +452,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
bool sawSecWebSocketAcceptHeaderField = false;
bool sawSecWebSocketProtocolHeaderField = false;
const char* p = start;
- for (; p < end; p++) {
+ while (p < end) {
size_t consumedLength = parseHTTPHeader(p, end - p, m_failureReason, name, value);
if (!consumedLength)
return 0;
« no previous file with comments | « no previous file | Source/platform/network/HTTPParsers.cpp » ('j') | Source/platform/network/HTTPRequest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698