-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect to new page on successful form submission contains unexpected text/vnd.turbo-stream.html #1018
Comments
@pySilver how was the original What is the status code in the response from the server? Is it a 303 See Other like the Turbo Drive documentation suggests, or another The |
@seanpdoyle Sorry for the delay with the reply. Setup was the following:
What I've expected: The user is redirected to a new location using GET request without any specific request headers attached. |
@pySilver thank you for clarifying! I believe that the client-side of Turbo doesn't have access to the intermediate redirect response headers, so it doesn't have access to remove the header. |
@seanpdoyle Yeah. This is what I thought - it's probably the browser that is following a redirect and applying previous headers automatically (or more specifically Fetch API). I'm wondering: How it differ when the form is wrapped in the frame? |
I'm surprised to see that form POST submission that responded with a redirect results in following this redirect along with
text/vnd.turbo-stream.html
header attached.Is that a bug or desired behavior? It is really hard to distinguish such redirects from other stream requests on the backend. I believe it's a bug because if I wanted to respond with a stream I'd do it directly, instead of sending a redirect header.
Am I missing something?
The text was updated successfully, but these errors were encountered: