Forum Discussion
ML_108504
Nimbostratus
Apr 22, 2009HTTP::respond question on content
I'm attempting to compose an iRule where the F5 will respond with a standard JBoss 404 if there's a match to certain URIs.
I have two issues.
1. I want to insert the requ...
hoolio
Cirrostratus
Apr 23, 2009The outermost curly braces prevent variable expansion/interpretation of commands in TCL. You should be able to use subst (Click here) to force evaluation of the [HTTP::uri] command within the curly braces:
HTTP::respond 404 content [subst {test URI: [HTTP::uri] }] noserver
The Connection and Content-Length headers are inserted automatically. You could try setting a Connection: Close header, but I'm guessing it would be appended to the request and not replace the Connection: Keep-Alive header.
HTTP::respond 404 content [subst {test URI: [HTTP::uri] }] noserver Connection Close
And LTM needs to insert the Content-Length header in order to tell the client how much data will be sent.
Aaron
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