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

Unified Diff: net/server/http_server.h

Issue 2314073003: Handle non-HTTP/1.1 requests more gracefully in net::HttpServer. (Closed)
Patch Set: Close the connection on a parsing error 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') | net/server/http_server_unittest.cc » ('J')
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..2384670749c3519346d87c80a1091d2c39376a99 100644
--- a/net/server/http_server.h
+++ b/net/server/http_server.h
@@ -98,8 +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.
- bool ParseHeaders(const char* data,
+ // recv data. If parsing fails, the connection will be closed.
mmenke 2016/09/12 20:35:04 Here's my suggestion: Return false on error, leav
slan 2016/09/14 15:50:57 Done.
+ bool ParseHeaders(int connection_id,
+ const char* data,
size_t data_len,
HttpServerRequestInfo* info,
size_t* pos);
« no previous file with comments | « no previous file | net/server/http_server.cc » ('j') | net/server/http_server_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698