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

Unified Diff: net/server/http_server.h

Issue 2314073003: Handle non-HTTP/1.1 requests more gracefully in net::HttpServer. (Closed)
Patch Set: . Created 4 years, 3 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 | net/server/http_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/http_server.h
diff --git a/net/server/http_server.h b/net/server/http_server.h
index a0062d6821bc30f8129e590e31ef03bf0563aa84..a59333b2d8e4544a2d490d41110090146e77696d 100644
--- a/net/server/http_server.h
+++ b/net/server/http_server.h
@@ -98,7 +98,9 @@ class HttpServer {
// Expects the raw data to be stored in recv_data_. If parsing is successful,
// will remove the data parsed from recv_data_, leaving only the unused
- // recv data.
+ // recv data. If all data has been consumed successfully, but the headers are
+ // not fully parsed, *pos will be set to zero. Returns false if an error is
+ // encountered while parsing, true otherwise.
bool ParseHeaders(const char* data,
size_t data_len,
HttpServerRequestInfo* info,
« no previous file with comments | « no previous file | net/server/http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698