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

Issue 2374253010: Add Content-Type header to net::ReportSender reports (Closed)

Created:
4 years, 2 months ago by estark
Modified:
4 years, 2 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Add Content-Type header to net::ReportSender reports Two sites that are opted into OCSP Expect-Staple reporting (www.dropbox.com, www.caddyserver.com) reported that they were receiving reports from Chrome with empty request bodies. This turned out to be their logging code not handling requests with no Content-Type header. When TransportSecurityState sends JSON violation reports for HPKP and Expect-Staple, it ought to be sending a Content-Type header of application/json. Thus, this CL adds a |content_type| parameter to net::ReportSender::Send() and updates the users of net::ReportSender (including TransportSecurityState) to set |content_type| appropriately. BUG=650327 Review-Url: https://codereview.chromium.org/2365353004 Cr-Commit-Position: refs/heads/master@{#421459} (cherry picked from commit b1716e2e3830aa031dc335b0403913efadb199dd) Committed: https://chromium.googlesource.com/chromium/src/+/61b52dfd2e3ee00f90c06ddb536139095bbb4cbe

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -26 lines) Patch
M chrome/browser/safe_browsing/mock_permission_report_sender.h View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/mock_permission_report_sender.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/permission_reporter.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/safe_browsing/permission_reporter_unittest.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ssl/chrome_expect_ct_reporter.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M components/certificate_reporting/error_reporter.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/certificate_reporting/error_reporter_unittest.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M net/http/transport_security_state.h View 2 chunks +7 lines, -2 lines 0 comments Download
M net/http/transport_security_state.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M net/http/transport_security_state_unittest.cc View 8 chunks +20 lines, -3 lines 0 comments Download
M net/url_request/report_sender.h View 1 chunk +3 lines, -1 line 0 comments Download
M net/url_request/report_sender.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M net/url_request/report_sender_unittest.cc View 6 chunks +18 lines, -4 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 4 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
estark
4 years, 2 months ago (2016-09-30 15:47:55 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
61b52dfd2e3ee00f90c06ddb536139095bbb4cbe.

Powered by Google App Engine
This is Rietveld 408576698