Forum Discussion

Darren_Walker_2's avatar
Jan 20, 2017

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 } }

 

4 Replies