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

Unified Diff: third_party/WebKit/Source/core/loader/PingLoader.cpp

Issue 2717463006: Change XSS Auditor report's MIME type. (Closed)
Patch Set: tests Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/PingLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/PingLoader.cpp b/third_party/WebKit/Source/core/loader/PingLoader.cpp
index 6afde83f2368e9eb360675f1a959aa8838089739..e02b49bb2f4ea36d7af47d17bf9217a32685a05c 100644
--- a/third_party/WebKit/Source/core/loader/PingLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/PingLoader.cpp
@@ -523,9 +523,14 @@ void PingLoader::sendViolationReport(LocalFrame* frame,
ViolationReportType type) {
ResourceRequest request(reportURL);
request.setHTTPMethod(HTTPNames::POST);
- request.setHTTPContentType(type == ContentSecurityPolicyViolationReport
- ? "application/csp-report"
- : "application/json");
+ switch (type) {
+ case ContentSecurityPolicyViolationReport:
+ request.setHTTPContentType("application/csp-report");
+ break;
+ case XSSAuditorViolationReport:
+ request.setHTTPContentType("application/xss-auditor-report");
+ break;
+ }
request.setHTTPBody(std::move(report));
finishPingRequestInitialization(request, frame,
WebURLRequest::RequestContextCSPReport);
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698