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

Unified Diff: net/http/transport_security_state.cc

Issue 2365353004: Add Content-Type header to net::ReportSender reports (Closed)
Patch Set: make content type a required parameter to Send() 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
Index: net/http/transport_security_state.cc
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index b01cc8fec0d06f05c58fb524c324e176674bee08..d129d0e93218df4df24d0621d4bef8fcf13d52c6 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -813,7 +813,8 @@ void TransportSecurityState::CheckExpectStaple(
&serialized_report)) {
return;
}
- report_sender_->Send(expect_staple_state.report_uri, serialized_report);
+ report_sender_->Send(expect_staple_state.report_uri, "application/json",
+ serialized_report);
}
bool TransportSecurityState::HasPublicKeyPins(const std::string& host) {
@@ -1071,7 +1072,8 @@ TransportSecurityState::CheckPinsAndMaybeSendReport(
base::TimeTicks::Now() +
base::TimeDelta::FromMinutes(kTimeToRememberHPKPReportsMins));
- report_sender_->Send(pkp_state.report_uri, serialized_report);
+ report_sender_->Send(pkp_state.report_uri, "application/json",
+ serialized_report);
return PKPStatus::VIOLATED;
}

Powered by Google App Engine
This is Rietveld 408576698