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

Issue 2212883002: Make net::HttpRequestHeaders::AddHeadersFromString split on NL (Closed)

Created:
4 years, 4 months ago by Adam Rice
Modified:
4 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make net::HttpRequestHeaders::AddHeadersFromString split on NL Previously, AddHeaderFromString() only split on CRNL terminators. However, some HTTP servers will treat an individual CR or NL as a line terminator. This could lead to a difference of interpretation between what Chrome intended to send and what the server thought it received. To avoid this, make AddHeadersFromString split on individual CR and NL characters. No code should be calling AddHeadersFromString with individual CR or NL embedded, so this change should not break anything that was not broken already. BUG=634225 TEST=net_unittests

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -4 lines) Patch
M net/http/http_request_headers.h View 2 chunks +5 lines, -2 lines 0 comments Download
M net/http/http_request_headers.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/http/http_request_headers_unittest.cc View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (6 generated)
Adam Rice
4 years, 4 months ago (2016-08-04 09:45:51 UTC) #6
Adam Rice
4 years, 4 months ago (2016-08-04 09:46:01 UTC) #7
Adam Rice
4 years, 4 months ago (2016-08-22 07:28:26 UTC) #8
This problem was fixed in a different way by having  AddHeaderFromString filter
out bad headers, so this change
is no longer needed.

Powered by Google App Engine
This is Rietveld 408576698