ML_108504
Apr 22, 2009Nimbostratus
HTTP::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 requested URI into the HTTP::respond content section, using the HTTP::uri command. Is this feasible? Do I need to use escape characters in order to use HTTP:: commands (or variables for that matter) inside of a HTTP::respond content section?
The code below just treats [HTTP::uri] as a text string.
HTTP::respond 404 content {JBossWeb/2.0.1.GA - Error report HTTP Status 404 - [HTTP::uri]type Status reportmessage [HTTP::uri]description The requested resource ([HTTP::uri]) is not available.JBossWeb/2.0.1.GA} noserver
2. This HTTP::respond command passes the following to the client, and I don't want the Connection and Content-Length headers passed this way. I'm not doing this explicitly, how can I prevent these two lines from appearing? I just want the section to be passed to the client, with the [HTTP::uri] value passed by the client.
Connection: Keep-Alive
Content-Length: 979
JBossWeb/2.0.1.GA - Error report HTTP Status 404 - [HTTP::uri]type Status reportmessage [HTTP::uri]description The requested resource ([HTTP::uri]) is not available.JBossWeb/2.0.1.GA