Closed tianon closed 7 months ago
@tianon - thanks for the contribution (I'll let @rogpeppe review).
Thanks also for signing off your commit for DCO (we use the same setup here as in the main CUE project). As an FYI, I've updated the README to reference a CONTRIBUTING guide (again based on the CUE guide) for future contributions from folks who aren't aware.
LGTM modulo a few formatting nits, and I think it could do with a test. I can take it from here though. Moved to https://review.gerrithub.io/c/cue-labs/oci/+/1177062.
This is suggested by the godoc for
Authorizer.DoRequest
, but was not implemented in theociauth
-provided implementation.This is especially useful for endpoints like
PushManifest
inociclient
which usesbytes.NewReader
and is thus restartable (and Go'shttp.NewRequestWithContext
setsGetBody
automatically for us, in that case).Without this, I was getting
net/http: HTTP/1.x transport connection broken: http: ContentLength=6415 with Body length 0
whenociauth
would retry myPUT
request after collecting the necessary authentication token, and I've verified that this does fix it.I'm happy to adjust, rebase, amend, force push, let someone else carry, explain, etc as desired. :bow: