Skip to content

Make it possible to use 302 redirect with RedirectAsync #20

@jkapi

Description

@jkapi

Currently HttpListenerResponse.RedirectAsync uses status code 301, Moved Permanently. This can cause unwanted behavoir because Google Chrome caches this.
Possible scenario:
You want to go to /users, but you have to be logged in, so you use RedirectAsync to go to /login. After you logged in you are redirected back to possibly /index or another page. What can happen now is that if you want to go to /login, you're automatically transferred to /index and the same with /users (getting transferred to /login).
If you use 302, Redirect this move will not be cached, doing the same as PHP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions