Skip to content

Send Content-Type on the Codecov v4 upload - #363

Open
asinghvi17 wants to merge 2 commits into
JuliaCI:masterfrom
asinghvi17:codecov-s3-headers
Open

asinghvi17 wants to merge 2 commits into
JuliaCI:masterfrom
asinghvi17:codecov-s3-headers

Conversation

@asinghvi17

@asinghvi17 asinghvi17 commented Sep 12, 2026

Copy link
Copy Markdown

Restores Content-Type: application/json on the Codecov v4 upload PUT in Codecov.upload_to_s3, with a test that proves it arrives.

Stacked on #362 — review that first. GitHub requires the base branch to live in this repo, so this targets master and shows #362's commit until it merges.

Cause

The keyword has been misspelled header since 5baa283 (Feb 2021). HTTP.jl 1.x silently dropped it; HTTP.jl 2.0 raises MethodError, which is how it surfaced.

Which headers, and why

Uploader Headers on the v4 PUT
codecov-bash Content-Type: application/x-gzip, Content-Encoding: gzip
codecov/uploader Content-Type: text/plain, Content-Encoding: gzip, User-Agent
  • Content-Type is safe to restore: the two uploaders send different values to the same presigned URL, so it is outside the signed header set.
  • x-amz-storage-class stays out: neither uploader sends any x-amz-* header, and the v4 target is a GCS-backed presigned URL (storage.googleapis.com).

Changes

  • upload_to_s3 sends Content-Type and returns the response.
  • The existing black-hole test asserts against the httpbingo echo that Content-Type arrives and no x-amz-* header is sent; an overridden JULIA_COVERAGE_BLACK_HOLE_SERVER_URL_PUT skips the echo assertions.

374 tests pass locally on Julia 1.13 / HTTP 2.6.7, up from 372 on the base branch.

🤖 Generated with Claude Code

asinghvi17 and others added 2 commits September 11, 2026 20:02
HTTP.jl 2.0 removes String(::Message), rejects unknown request keywords,
and wraps server request bodies in HTTP.BytesBody. Bump julia compat to
1.10, the floor HTTP.jl 2.0 requires.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The PUT has gone out header-less since the v4 migration: the keyword was
spelled `header`, which HTTP.jl never recognized. Codecov's own uploaders
send no x-amz-* headers to the GCS-backed upload URL, so restore only
Content-Type and assert it against the echo server.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant