Forum Discussion
Error: read ECONNRESET error while using Postman for API calls after change to irule
- Aug 15, 2022
Hi krisnaseechurn, the HTTP::redirect command is used a couple of times in your iRule.
It´s best practice, to use a "return" command afterwards and perhaps an "event disable" command to prevent the iRule from further execution.
Personally I´m trying to avoid the HTTP::redirect. Instead I prefer to use HTTP::respond because it´s providing very granular control about the exact status code (maybe you prefer a 301 instead of 302?). It also allows to add a Connection Close header. Along with an "event disable" command followed by a "return" you will definitely avoid further execution of the iRule event where the command was fired.
For debugging it would help to force an unwanted redirect and monitor the /var/log/ltm for log entries and TCL errors/warnings:
tail -f /var/log/ltm
- Aug 16, 2022
thanks for all the input..
the issue was it was missing an !
if { !([HTTP::status]=="500") && \
hi, the solution works but partly :(. F5 is now happy with the syntax however it is still triggering a 302.
(Editors Note: the remainder of this post has been redacted by request. The solution was not part of this content.)
Hi krisnaseechurn, the HTTP::redirect command is used a couple of times in your iRule.
It´s best practice, to use a "return" command afterwards and perhaps an "event disable" command to prevent the iRule from further execution.
Personally I´m trying to avoid the HTTP::redirect. Instead I prefer to use HTTP::respond because it´s providing very granular control about the exact status code (maybe you prefer a 301 instead of 302?). It also allows to add a Connection Close header. Along with an "event disable" command followed by a "return" you will definitely avoid further execution of the iRule event where the command was fired.
For debugging it would help to force an unwanted redirect and monitor the /var/log/ltm for log entries and TCL errors/warnings:
tail -f /var/log/ltm
- krisnaseechurnAug 16, 2022Altostratus
thanks for all the input..
the issue was it was missing an !
if { !([HTTP::status]=="500") && \
Recent Discussions
Related Content
* 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