Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

If HTTP::status is 404 send the request to a different pool.

If the response is a 404 I want that client to try the same path on a different pool. I can make a dataclass with the HTTP::path and when it matches that class, send it to that pool but I am trying to come up of a way to not have to manage a list of paths as exceptions. I tried this but it gives a connection reset instead of sending it to the 2nd pool:

when HTTP_REQUEST { set request [HTTP::request]}

when HTTP_RESPONSE { if { [HTTP::status] == 404 } { pool pool_2 HTTP::retry $request } }

0
Rate this Question
Comments on this Question
Comment made 20-Jan-2017 by Darren Walker 226

HTTP::retry $request only works for the current pool. Is there a way to say

1) Use a different pool (and specify the pool)

2) HTTP::retry $request

0
Comment made 20-Jan-2017 by crodriguez

There is an interesting example on the HTTP::retry Wiki page here that might be of interest to you. It's functionality is limited to HTTP GET requests but it may work for you. Scroll down to the second example labeled "# Retry 404 responses once to a second pool"

1
Comment made 20-Jan-2017 by Arie 2069
0
Comment made 20-Jan-2017 by Darren Walker 226

The HTTP::retry page with the 404 example is working. Thanks!

0

Answers to this Question