# # # QS_LocRequestLimit /cgi-local 3 # INCLUDE scripts/ports EXEC ./ctl.sh restart -D LimitLocal 2>/dev/null 1>/dev/null CLIENT _EXEC echo "[`date '+%a %b %d %H:%M:%S.000000 %Y'`] [test:notice] [pid $$:tid 0] htt: 202_QS_LocRequestLimit_Local.htt " >> logs/error_log _SLEEP 500 _REQ localhost $QS_PORT_BASE __GET /cgi-local/sleep.cgi?s=5 HTTP/1.1 __Host: localhost __Connection: close __User-Agent: httest __ _EXPECT . "failed to serve your request" _WAIT _CLOSE _SLEEP 150 # duration 0 seconds _EXPECT EXEC "GET /cgi-local/sleep.cgi.s=5 HTTP/1.1. 503 ... .httest. 0 cr=4" _EXEC tail -2 logs/access_log _EXPECT EXEC "mod_qos.010.: access denied, QS_LocRequestLimit. rule: /cgi-local.3., concurrent requests=4" _EXEC tail -2 logs/error_log END CLIENT 3 _SLEEP 100 _REQ localhost $QS_PORT_BASE __GET /cgi-local/sleep.cgi?s=2 HTTP/1.1 __Host: localhost __Connection: keep-alive __ _EXPECT . "done" _WAIT _CLOSE END BLOCK FINALLY _SLEEP 3000 _EXEC ./ctl.sh restart 2>/dev/null 1>/dev/null END