From 54d0a4bb95c071fce9c1037f186e4c94728644b8 Mon Sep 17 00:00:00 2001 From: hootener Date: Mon, 18 May 2020 12:17:34 -0500 Subject: [PATCH 1/4] Remove Public Read header from presigned PUT --- Source/Codecov/Upload/CodecovUploader.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Codecov/Upload/CodecovUploader.cs b/Source/Codecov/Upload/CodecovUploader.cs index 83d6e84..4663a25 100644 --- a/Source/Codecov/Upload/CodecovUploader.cs +++ b/Source/Codecov/Upload/CodecovUploader.cs @@ -42,13 +42,9 @@ protected virtual void ConfigureContent(HttpContent content) content.Headers.ContentType = new MediaTypeHeaderValue("application/x-gzip"); } - protected virtual void ConfigureRequest(HttpRequestMessage request) - => request.Headers.TryAddWithoutValidation("x-amz-acl", "public-read"); - + protected virtual HttpResponseMessage CreateResponse(HttpRequestMessage request) { - ConfigureRequest(request); - request.Content = new ByteArrayContent(GetReportBytes()); ConfigureContent(request.Content); From 7e9deb3afcc722a68edce6036ade742479b01633 Mon Sep 17 00:00:00 2001 From: Eli Hooten Date: Fri, 22 May 2020 09:41:45 -0500 Subject: [PATCH 2/4] Add Empty ConfigureRequest Method Added empty `ConfigureRequest` method to address comment in PR review. --- Source/Codecov/Upload/CodecovUploader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Codecov/Upload/CodecovUploader.cs b/Source/Codecov/Upload/CodecovUploader.cs index 4663a25..889ab8e 100644 --- a/Source/Codecov/Upload/CodecovUploader.cs +++ b/Source/Codecov/Upload/CodecovUploader.cs @@ -42,7 +42,8 @@ protected virtual void ConfigureContent(HttpContent content) content.Headers.ContentType = new MediaTypeHeaderValue("application/x-gzip"); } - + protected virtual void ConfigureRequest(HttpRequestMessage request) { } + protected virtual HttpResponseMessage CreateResponse(HttpRequestMessage request) { request.Content = new ByteArrayContent(GetReportBytes()); From 58d2893f496718d2385edfd6a59b56f9f50e55b7 Mon Sep 17 00:00:00 2001 From: Eli Hooten Date: Tue, 2 Jun 2020 08:09:18 -0500 Subject: [PATCH 3/4] Add Upgrade Message to Known Issues --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 03d1cb4..d158e3b 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,10 @@ All types of contributions are welcome! Feel free to open an [issue](https://git - Specifiyng file paths with spaces is currently not possible without a workaround. This is expected to be fixed when a new major release of codecov-exe is released (See issue [#71](https://github.com/codecov/codecov-exe/issues/71) for possible workaround and tracking). + +- If you're seeing an **HTTP 400 error when uploading reports to S3**, make sure you've updated to at least version 1.11.0. + + ## Maintainers From c0c41ba04ee9f5bc3e56f2c6f05c23ab9ae5ac02 Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Wed, 10 Jun 2020 03:11:26 +0200 Subject: [PATCH 4/4] (maint) Added missing call to 'ConfigureRequest' used in inherited class --- Source/Codecov/Upload/CodecovUploader.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Codecov/Upload/CodecovUploader.cs b/Source/Codecov/Upload/CodecovUploader.cs index 889ab8e..6f80add 100644 --- a/Source/Codecov/Upload/CodecovUploader.cs +++ b/Source/Codecov/Upload/CodecovUploader.cs @@ -42,10 +42,14 @@ protected virtual void ConfigureContent(HttpContent content) content.Headers.ContentType = new MediaTypeHeaderValue("application/x-gzip"); } - protected virtual void ConfigureRequest(HttpRequestMessage request) { } + protected virtual void ConfigureRequest(HttpRequestMessage request) + { + } protected virtual HttpResponseMessage CreateResponse(HttpRequestMessage request) { + ConfigureRequest(request); + request.Content = new ByteArrayContent(GetReportBytes()); ConfigureContent(request.Content);