Forum Discussion
Jonathan_Edgewo
Nimbostratus
Mar 10, 2007http 204 response with http::close statement
When using a rule that responds to http requests with a 204 response code, if it use the http::close statement after the response statement, I get this error in the log:
TCL error: Rule http_204 ...
hoolio
Cirrostratus
Dec 22, 2008Here is the feedback on HTTP::close I received from F5 Support in C462406:
HTTP::close semantics are "close the connection after this request/response has been processed". Since HTTP::respond effectively completes the request/response, HTTP::close cannot be used after HTTP::respond. TCP::close can be used to gracefully close the connection after HTTP::respond, if using Connection::close is not acceptable - use of clientside is required to close the clientside if in server-side event, i.e. HTTP_RESPONSE.
So it would probably be best to use TCP::close in HTTP_REQUEST and clientside {TCP::close} in HTTP_RESPONSE (or other events in the serverside context):
when HTTP_REQUEST {
HTTP::respond 204
TCP::close
}
when HTTP_RESPONSE {
HTTP::respond 200 content "test"
clientside {TCP::close}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
