Send Content-Type on the Codecov v4 upload - #363
Open
asinghvi17 wants to merge 2 commits into
Open
asinghvi17 wants to merge 2 commits into
asinghvi17 wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores
Content-Type: application/jsonon the Codecov v4 upload PUT inCodecov.upload_to_s3, with a test that proves it arrives.Cause
The keyword has been misspelled
headersince 5baa283 (Feb 2021). HTTP.jl 1.x silently dropped it; HTTP.jl 2.0 raisesMethodError, which is how it surfaced.Which headers, and why
codecov-bashContent-Type: application/x-gzip,Content-Encoding: gzipcodecov/uploaderContent-Type: text/plain,Content-Encoding: gzip,User-AgentContent-Typeis 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-classstays out: neither uploader sends anyx-amz-*header, and the v4 target is a GCS-backed presigned URL (storage.googleapis.com).Changes
upload_to_s3sendsContent-Typeand returns the response.httpbingoecho thatContent-Typearrives and nox-amz-*header is sent; an overriddenJULIA_COVERAGE_BLACK_HOLE_SERVER_URL_PUTskips 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