Skip to content

Removed redundant POST request exclusion info #3883

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

Closed
wants to merge 3 commits into from

Conversation

ryanotella
Copy link

The default ExceptionListener::setTargetPath() already excludes POSTs/PUTs, so suggesting that people should implement their own listener to do this is a bit misleading.

However, doing this to prevent XMLHttpRequest URIs from being saved is still valuable.

The default ``ExceptionListener::setTargetPath()`` already excludes POSTs/PUTs, so suggesting that people who implement their own listener to do this is a bit misleading.

However, doing this to prevent XMLHttpRequest URIs from being saved is still valuable.
method, the user is redirected to this route only to get a 404 error.
On some occasions, this is unexpected. For example when the last request before logout
was an XMLHttpRequest route, the user may be redirected back to an invalid
route.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like all of this! But, this is actually related to logging in, not logging out:

  1. I go to a page in my browser and it redirects me to /login
  2. While I'm typing in my user/pass, another tab I have open is making an AJAX request, which is being redirected to /login (and which is causing setTargetPath to be called).
  3. I login, and now I'm redirected to that AJAX URL

So, if you clarify this (i.e. don't talk about logout), we're good! If I'm missing something, please let me know!

Thanks!

@wouterj
Copy link
Member

wouterj commented Aug 15, 2014

@ryancastle can you please take a look at @weaverryan 's comment?

@ryanotella
Copy link
Author

@wouterj ,@weaverryan Hopefully, this is improved?

On some occasions, this is unexpected. For example when the last request
URI was an HTTP POST against a route which is configured to allow only a POST
method, the user is redirected to this route only to get a 404 error.
In some situations, this is not ideal. For example when the last request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a comma after "For example".

@ryanotella
Copy link
Author

@xabbuh Comma added!

@weaverryan
Copy link
Member

Great job Ryan - this is very clean now. Thanks!

@ryanotella ryanotella deleted the patch-1 branch August 20, 2014 01:12
@ryanotella ryanotella restored the patch-1 branch August 20, 2014 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants