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

Issue 2314073003: Handle non-HTTP/1.1 requests more gracefully in net::HttpServer. (Closed)

Created:
4 years, 3 months ago by slan
Modified:
4 years, 3 months ago
Reviewers:
mmenke, davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, derekjchow1, halliwell
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle non-HTTP/1.1 requests more gracefully in net::HttpServer. Currently, HTTP/1.0 requests are causing http_server.cc to crash. Code shouldn't crash when it is supplied with bad data. Simply move into an error state and close the connection instead. BUG= Committed: https://crrev.com/f955ff0a59acc5e389d83a3497407f92989277fe Cr-Commit-Position: refs/heads/master@{#419327}

Patch Set 1 #

Patch Set 2 : Add unittests. #

Patch Set 3 : Close the connection on a parsing error #

Total comments: 6

Patch Set 4 : More tests #

Total comments: 4

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -7 lines) Patch
M net/server/http_server.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M net/server/http_server.cc View 1 2 3 4 3 chunks +15 lines, -4 lines 0 comments Download
M net/server/http_server_unittest.cc View 1 2 3 4 6 chunks +47 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (18 generated)
slan
This handles malformed incoming requests a little more gracefully than crashing. PTAL!
4 years, 3 months ago (2016-09-06 22:16:13 UTC) #2
mmenke
On 2016/09/06 22:16:13, slan wrote: > This handles malformed incoming requests a little more gracefully ...
4 years, 3 months ago (2016-09-07 16:47:18 UTC) #8
slan
On 2016/09/07 16:47:18, mmenke wrote: > On 2016/09/06 22:16:13, slan wrote: > > This handles ...
4 years, 3 months ago (2016-09-07 20:12:23 UTC) #11
slan
Friendly ping!
4 years, 3 months ago (2016-09-12 19:36:09 UTC) #12
mmenke
On 2016/09/12 19:36:09, slan wrote: > Friendly ping! I'm sorry, this dropped of my radar. ...
4 years, 3 months ago (2016-09-12 19:39:20 UTC) #13
mmenke
https://codereview.chromium.org/2314073003/diff/40001/net/server/http_server.h File net/server/http_server.h (right): https://codereview.chromium.org/2314073003/diff/40001/net/server/http_server.h#newcode101 net/server/http_server.h:101: // recv data. If parsing fails, the connection will ...
4 years, 3 months ago (2016-09-12 20:35:04 UTC) #14
slan
PTAL! https://codereview.chromium.org/2314073003/diff/40001/net/server/http_server.h File net/server/http_server.h (right): https://codereview.chromium.org/2314073003/diff/40001/net/server/http_server.h#newcode101 net/server/http_server.h:101: // recv data. If parsing fails, the connection ...
4 years, 3 months ago (2016-09-14 15:50:57 UTC) #15
mmenke
Sorry I didn't get to this yesterday, was out (And sorry for general slowness on ...
4 years, 3 months ago (2016-09-15 17:40:12 UTC) #20
slan
PTAL! https://codereview.chromium.org/2314073003/diff/60001/net/server/http_server.cc File net/server/http_server.cc (right): https://codereview.chromium.org/2314073003/diff/60001/net/server/http_server.cc#newcode239 net/server/http_server.cc:239: // If pos is 0, we read all ...
4 years, 3 months ago (2016-09-16 22:35:30 UTC) #21
mmenke
LGTM!
4 years, 3 months ago (2016-09-16 22:37:56 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2314073003/80001
4 years, 3 months ago (2016-09-16 22:41:32 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-16 23:36:32 UTC) #29
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 23:38:18 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f955ff0a59acc5e389d83a3497407f92989277fe
Cr-Commit-Position: refs/heads/master@{#419327}

Powered by Google App Engine
This is Rietveld 408576698