You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg/tool/http: allow configuration of following redirects
The default net/http.Client in Go follows redirects. This is a sensible
default, both in Go and in the pkg/tool/http Do wrappers.
However there are times when it is useful to be able to assert the
actual status code returned by an endpoint _is_ a redirect, which
otherwise cannot be determined when redirects are automatically
followed.
We fix this by introducing a new top-level config field followRedirects
on http.Do, which defaults to true, but can explicitly be set to false
in which case the status code, body etc of the first response is used to
populate the response field.
Fixes#3896.
Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I7788414b60c50831e25b24453e5a85d290f477f1
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1213859
Reviewed-by: Roger Peppe <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
0 commit comments