Forum Discussion
Gerald_Meese
Cirrus
Jan 18, 2018iRule - Do HTTP::redirect while preserving the POST method
Hello,
I'm using the following iRule to do a redirect to a specific URI :
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/internalURI"} {
set logindata [b64encode "username:password"]
...
Stanislas_Piro2
Cumulonimbus
Jan 18, 2018Hi,
Http::redirect respond with a 302 code and Location header set with new URL.
It never define if the method must be preserved or not!
In HTTP RFC, look at this text
Note: For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, the 307 (Temporary Redirect) status code can be used instead.
So the 307 is the good response which can only be set with HTTP::respond command
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects