server_connected
2 TopicsHTTP::responded based on test in SERVER_CONNECTED
Hi, I need to gracefully respond to HTTP request when setting Server SSL profile fails. Maybe I am wrong but first event that cen be used for: [PROFILE::exists serverssl] == 1 - check if profile is attached to VS SSL::profile $ssls - set specific profile based on some tests But if backend connection requires SSL but no profile is attached to VS or profile that is set via SSL::profile do not exists I would like to reject client connection by sending HTTP::response 500 Only way to cancel serverside processing I was able to figure out was setting selected pool member down via: LB::down pool $newpool member [LB::server addr] [LB::server port] After this command LB_FAILED is raised and I can use: HTTP::respond 500 content "Some message" Connection close event disable TCP::close return I am curious if this is right way to achieve my goal? Any simpler better or more robust ways? Piotr272Views0likes1CommentSERVER_CONNECTED and reject - how affects clientside
Hi, From my test when I use reject in SERVER_CONNECTED event then following sequence of events is triggered (hope that logging indicates order of events): LB_FAILED CLIENT_CLOSED SERVER_CLOSED I have HTTP::respond in LB_FAILED but it's not executed. What is the reason? In LB_FAILED clientside connection should be still open so iRule should be able to send response - but looks like it is not the case. Is reject in SERVER_CONNECTED somehow removing/disabling clientside TCP connection? If it is so is there any way to send HTTP response instead of TCP connection reset sequence? Piotr700Views0likes5Comments