heroku / docker-registry-client

A Go API client for the v2 Docker Registry API
BSD 3-Clause "New" or "Revised" License
297 stars 225 forks source link

Fix UploadBlob() and PutManifest() in case of token authentication #60

Open kispaljr opened 5 years ago

kispaljr commented 5 years ago

Fixes issue https://github.com/heroku/docker-registry-client/issues/8. As explained in the issue, UploadBlob() is not working properly in case of token authentication. More precisely it cannot resend the request after the 401 Unauthorized response, because the Body (content reader) is not reusable.