Update upload request headers - #90
Merged
Merged
Conversation
thelovekesh
commented
Jul 19, 2025
Collaborator
- Add content length header in tarball upload requests
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds content length headers to tarball upload requests as specified in the title. The changes also include replacing Docker dependencies with containerd equivalents and implementing custom signal handling for better termination behavior.
- Add
ContentLengthfield to upload options and pass it as a custom header - Replace
github.com/docker/dockerdependency withgithub.com/containerd/errdefs - Implement custom signal handling with proper exit codes for terminated processes
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Replace docker dependency with containerd/errdefs |
| cmd/wpm/wpm.go | Implement custom signal handling and replace docker errdefs usage |
| cli/registry/client/client.go | Add ContentLength field and x-wpm-content-length header |
| cli/command/utils.go | Replace docker errdefs with custom cancelled error type |
| cli/command/publish/publish.go | Pass content length to upload options |
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.