Fix all media types in Accept header to match RFC
Fixes the media type to align with Accept HTTP header RFC which specifies glob syntax */* See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -80,7 +80,7 @@ func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (conten
|
||||
}
|
||||
|
||||
req := p.request(host, http.MethodHead, existCheck...)
|
||||
req.header.Set("Accept", strings.Join([]string{desc.MediaType, `*`}, ", "))
|
||||
req.header.Set("Accept", strings.Join([]string{desc.MediaType, `*/*`}, ", "))
|
||||
|
||||
log.G(ctx).WithField("url", req.String()).Debugf("checking and pushing to")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user