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
{{ message }}
Repository navigation
Commit 97a8a17
Browse filesBrowse the repository at this point in the historyBrowse files
fix(transport): apply refreshed bearer token after cross-host redirect (#2337)
When an http.Client-level redirect sends a request to a host that
differs from bt.registry, the sendRequest() closure skips setting the
Authorization header (its matchesHost guard returns false). The previous
code called sendRequest() again after bt.refresh(), so the freshly
fetched token was never applied to the retried request and the client
received a second 401 instead of succeeding.
Fix by reading the token directly from bt.bearer after a successful
refresh and setting the Authorization header unconditionally before
retrying, bypassing the matchesHost guard that is only needed to prevent
header forwarding on client-visible redirects.
Closes#2333
0 commit comments