Commit 048472b7 authored by Douglas Creager's avatar Douglas Creager Committed by Commit Bot

Reporting: Use application/reports+json MIME type for uploads

We changed the MIME type in https://github.com/w3c/reporting/issues/51
as part of the TAG review of the spec.

Bug: 868065
Change-Id: I4d8020bb39ef12b0695d5f5b16c56eaf2cf0a50e
Reviewed-on: https://chromium-review.googlesource.com/1152069Reviewed-by: default avatarMisha Efimov <mef@chromium.org>
Commit-Queue: Douglas Creager <dcreager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578656}
parent a27db4a5
......@@ -27,6 +27,8 @@ namespace net {
namespace {
constexpr char kUploadContentType[] = "application/reports+json";
constexpr net::NetworkTrafficAnnotationTag kReportUploadTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("reporting", R"(
semantics {
......@@ -349,9 +351,6 @@ class ReportingUploaderImpl : public ReportingUploader, URLRequest::Delegate {
} // namespace
// static
const char ReportingUploader::kUploadContentType[] = "application/report";
ReportingUploader::~ReportingUploader() = default;
// static
......
......@@ -30,8 +30,6 @@ class NET_EXPORT ReportingUploader {
using UploadCallback = base::OnceCallback<void(Outcome outcome)>;
static const char kUploadContentType[];
virtual ~ReportingUploader();
// Starts to upload the reports in |json| (properly tagged as JSON data) to
......
......@@ -45,7 +45,7 @@ void CheckUpload(const test_server::HttpRequest& request) {
}
auto it = request.headers.find("Content-Type");
EXPECT_TRUE(it != request.headers.end());
EXPECT_EQ(ReportingUploader::kUploadContentType, it->second);
EXPECT_EQ("application/reports+json", it->second);
EXPECT_TRUE(request.has_content);
EXPECT_EQ(kUploadBody, request.content);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment