ASM issue, need to return HTTP 500 to client in certain cases
I've written a script that captures the "Content-Type" header from requests. In the event that ASM blocks the request, I need to respond to the client with one of three types of responses (I'm using the ASM_REQUEST_BLOCKING event): If Content-Type = text/xml then send back a SOAP error with HTTP 200 If Content-Type = application/json then return HTTP 500 All others return the default ASM response with HTTP 200. Cases 1 & 3 are handled, but I can't figure out how to force an HTTP 500 status to be returned to the client. HTTP_RESPONSE doesn't fire when ASM blocks. Thanks for your advice.Solved3.8KViews0likes6CommentsWhat's the purpose of the catch block in an ASM_REQUEST_BLOCKING scenario
We're returning custom ASM-error pages by using an irule whose initial structure follows the principle of the article ASM_REQUEST_BLOCKING. Some month ago i decided to remove the last block 'when HTTP_RESPONSE_RELEASE'. Today i temporarily re-added it and was quite surprised about the log entries. Although the irule works as expected, the content of the catch block is getting executed. How do i identify the typ of the exception thrown by the irule? And what action should it take in this case, since everything works fine?356Views0likes1Comment