Axum redirect::to().into_response() changing the http Status code (303 -> 307)

⚓ rust    📅 2025-06-13    👤 surdeus    👁️ 1      

surdeus

Trying to redirect a success/failure to a post into a redirect to a get, using Response::to which is documented to return a 303.

But when i into_response it, i see a 307, which then do not cause the browser to convert the origin POST into a GET.

image

Why is this happening? should't into_response preserve the redirect?

edit: i'm using into_response to normalize all my handlers to -> Response

2 posts - 2 participants

Read full topic

🏷️ rust_feed