Skip to content

fix(sdk): Preserve request headers on 401 retry#1834

Merged
gtema merged 1 commit into
mainfrom
401-headers
Jul 10, 2026
Merged

fix(sdk): Preserve request headers on 401 retry#1834
gtema merged 1 commit into
mainfrom
401-headers

Conversation

@gtema

@gtema gtema commented Jul 10, 2026

Copy link
Copy Markdown
Owner

AsyncOpenStack::rest_async and OpenStack::rest rebuilt the request on a
401 retry with only method + URI, dropping Content-Type, Accept,
microversion headers (OpenStack-API-Version,
X-OpenStack-Nova-API-Version) and any endpoint request_headers().

Capture the original HeaderMap via headers_ref() before the retry loop
and re-apply it on each request rebuild.

Signed-off-by: Artem Goncharov artem.goncharov@gmail.com

AsyncOpenStack::rest_async and OpenStack::rest rebuilt the request on a
401 retry with only method + URI, dropping Content-Type, Accept,
microversion headers (OpenStack-API-Version,
X-OpenStack-Nova-API-Version) and any endpoint request_headers().

Capture the original HeaderMap via headers_ref() before the retry loop
and re-apply it on each request rebuild.

Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema merged commit 5c68a15 into main Jul 10, 2026
22 checks passed
This was referenced Jul 9, 2026
@gtema
gtema deleted the 401-headers branch July 13, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant