-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Set Content-Type header in registry client ReadFrom #3981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Content-Type header in registry client ReadFrom #3981
Conversation
Client ReadFrom doesn't set Content-Type header leading to server side implementor to assume it's application/octet-stream. This commit makes this explicit on the client side. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #3981 +/- ##
=======================================
Coverage 55.91% 55.91%
=======================================
Files 110 110
Lines 11057 11057
=======================================
Hits 6183 6183
Misses 4185 4185
Partials 689 689
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Also wondering;
- should requests set a user-agent?
- very off-topic; I noticed the
Docker-Upload-UUID
header; is that only for "v1" images? (as v2 would be content-addressable, so more likely to have a digest?)
We probably need a backport for this (although I still think it's a bit odd to make this a required header in the spec; not sure if that was intentional). |
No, this header is set on every blob upload (spec mentions them https://github.com/opencontainers/distribution-spec/blob/v1.0.1/spec.md#post-then-put); I think all these legacy headers have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Before we merge, I wanna wait for @corhere 👍 as he was the original reporter. |
Client ReadFrom doesn't set Content-Type header leading to server side implementor to assume it's application/octet-stream. This commit makes this explicit on the client side.
Closes #3965