# # MaxRequestWorkers 50 # QS_ClientPrefer 20 # # => limit start at: 10 # => penalty for unknown (but otherwise ok): 4 # => max: 50 # => spare (at least remaining) @penalty of 4: 120/12*4 => 13 # 50-13 => block @37 INCLUDE scripts/ports EXEC ./ctl.sh restart -D QS_ClientPrefer -D LowMaxClients -D h2 >/dev/null EXEC sleep 1 CLIENT 30 _EXPECT EXEC "ALPN, server accepted to use h2" _EXPECT EXEC "HTTP/2 confirmed" _EXPECT EXEC "done" _EXEC ./bin/curl -v --http2 --insecure https://server1:${QS_PORT_BASE2}/cgi-local/sleep.cgi?s=6 2>&1 END CLIENT 7 _SLEEP 2300 _EXPECT EXEC "ALPN, server accepted to use h2" _EXPECT EXEC "HTTP/2 confirmed" _EXPECT EXEC "done" _EXEC ./bin/curl -v --http2 --insecure https://server1:${QS_PORT_BASE2}/cgi-local/sleep.cgi?s3 2>&1 END CLIENT _SLEEP 2000 _REQ server1 SSL:${QS_PORT_BASE2} __GET /qos?auto HTTP/1.1 __Host: server1 __Connection: keep-alive __ _EXPECT . "QS_AllConn: 31" _EXPECT . "QS_ClientPrefer;10\[\]: 31" _WAIT _CLOSE _SLEEP 6500 _REQ server1 SSL:${QS_PORT_BASE2} __GET /qos?auto HTTP/1.1 __Host: server1 __Connection: keep-alive __ _EXPECT . "QS_AllConn: 1" _EXPECT . "QS_ClientPrefer;10\[\]: 1" _WAIT _CLOSE END CLIENT _SLEEP 4200 _EXPECT ERROR "Connection refused" _REQ server1 SSL:${QS_PORT_BASE2} _CLOSE _SLEEP 100 _EXPECT EXEC "mod_qos\(066\): access denied, QS_ClientPrefer rule \(penalty=4 0x00\): max=10, concurrent connections=38" _EXEC tail -2 logs/error_log END BLOCK FINALLY _EXEC ./ctl.sh stop 2>/dev/null 1>/dev/null _SLEEP 1000 _EXEC ./ctl.sh start 2>/dev/null 1>/dev/null END