Forum Discussion
bucklej3_128765
Nimbostratus
Aug 12, 2013ProxyPass redirect error on method POST
We ran into an issue with ProxyPass, where the following redirect causes the application to fail when issuing POST. You can see below we got around the issue by using if {[HTTP::method] equals "GET"}...
Simon_Kowallik1
Aug 12, 2013Historic F5 Account
HTTP::redirect uses the HTTP 302 status code to redirect a user agent to a new location, however when a user agent receives a HTTP 302 status code for a POST/PUT/DELETE HTTP request, it will use GET because it assumes the server received the data.
If you want to redirect the user agent and it should again issue a POST you would need to use HTTP status code 307, which will instruct the user agent to POST again to a different location.
HTTP::redirect only supports 302, so you would need to craft a HTTP redirect with HTTP::respond. Example:
HTTP::respond 307 Location "http://$orig_host$orig_uri/"
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