Skip to content
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

loss of all get/post data on redirect #19

Closed
jnkowa-gfk opened this issue Jun 26, 2020 · 7 comments
Closed

loss of all get/post data on redirect #19

jnkowa-gfk opened this issue Jun 26, 2020 · 7 comments

Comments

@jnkowa-gfk
Copy link

jnkowa-gfk commented Jun 26, 2020

the issue:
The current code does the redirect with a status code of 302.
this in general means that the client will do a redirect by forgetting about the original request but look at the newly given location. usually the request method will be changed from whatever it was to GET and the previously sent data will be forgotten.

The solution would be to change the behavior: don't use 302 status code, but use 307 instead.
benefits of behavior change:

  • relocation is still done
  • post/get data of original request is sent to the new location

since this is a behavior change, i suggest:

  • have the http response code used for redirecting to be a setting that defaults to the old behavior 302
  • setting can be overwritten
  • have a breaking change in the future, where the default changes from 302 to 307
@jnkowa-gfk
Copy link
Author

jnkowa-gfk commented Jun 26, 2020

keep in mind, that for a http status code of 307 still might drop query-string data. the query-string needst to be maintained in code.

@erguenyogurtcu
Copy link
Contributor

Fixed: #23

@achimfritz
Copy link

would be nice to have this PR, works for me

@Stuffy
Copy link

Stuffy commented Jan 26, 2022

This was also an issue on our project, we fixed this in a very similar way as the pr of @erguenyogurtcu does. Would be nice to have this integrated into an update, as this extension is the only somewhat up-to-date language redirect solution for typo3.

@jnkowa-gfk
Copy link
Author

@urbantrout ping

@jnkowa-gfk
Copy link
Author

thanks for the merge, @urbantrout .
very much appreciated, looking forward seeing this fix in the next release.

@urbantrout
Copy link
Owner

Thanks for the PR @erguenyogurtcu.
Will create a new release today.

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

No branches or pull requests

5 participants