Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(oci-distribution): do not set
Accept
header on all requests
When issuing requests to the OCI registry, only set the `Accept` header on endpoints that will use it in order to produce a response taking this parameter into account. The `oci-distribution` crate is currently having issues to push to the JFrog Artifactory registry, because this registry is strict in what headers are provided. This behavior is not specified in the OCI distribution specification, so the OCI registry implementors are open to behave in different ways. In any case, sending the `Accept` header on all requests with a fixed set of MIME types can be improved, and this change applies this header only on the requests that are expecting the server to reply with one of the given MIME types. Signed-off-by: Rafael Fernández López <rfernandezlopez@suse.com>
- Loading branch information