[ { "enabled":1, "version_min":300000, "title":"Testing Variables :: PATH_INFO (1/4)", "client":{ "ip":"200.249.12.31", "port":123 }, "server":{ "ip":"200.249.12.31", "port":80 }, "request":{ "headers":{ "Host":"localhost", "User-Agent":"curl/7.38.0", "Accept":"*/*", "Content-Length":"27", "Content-Type":"application/x-www-form-urlencoded" }, "uri":"/one/two/three", "method":"POST", "body":[ "param1=value1¶m2=value2" ] }, "response":{ "headers":{ "Date":"Mon, 13 Jul 2015 20:02:41 GMT", "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", "Content-Type":"text/html" }, "body":[ "no need." ] }, "expected":{ "debug_log":"Target value: \"/one/two/three\" \\(Variable: PATH_INFO\\)" }, "rules":[ "SecRuleEngine On", "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { "enabled":1, "version_min":300000, "title":"Testing Variables :: PATH_INFO (2/4)", "client":{ "ip":"200.249.12.31", "port":123 }, "server":{ "ip":"200.249.12.31", "port":80 }, "request":{ "headers":{ "Host":"localhost", "User-Agent":"curl/7.38.0", "Accept":"*/*", "Content-Length":"27", "Content-Type":"application/x-www-form-urlencoded" }, "uri":"/one/two/three?key=value", "method":"POST", "body":[ "param1=value1¶m2=value2" ] }, "response":{ "headers":{ "Date":"Mon, 13 Jul 2015 20:02:41 GMT", "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", "Content-Type":"text/html" }, "body":[ "no need." ] }, "expected":{ "debug_log":"Target value: \"/one/two/three\" \\(Variable: PATH_INFO\\)" }, "rules":[ "SecRuleEngine On", "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { "enabled":1, "version_min":300000, "title":"Testing Variables :: PATH_INFO (3/4)", "client":{ "ip":"200.249.12.31", "port":123 }, "server":{ "ip":"200.249.12.31", "port":80 }, "request":{ "headers":{ "Host":"localhost", "User-Agent":"curl/7.38.0", "Accept":"*/*", "Content-Length":"27", "Content-Type":"application/x-www-form-urlencoded" }, "uri":"/one/two/%20/three?key=value", "method":"POST", "body":[ "param1=value1¶m2=value2" ] }, "response":{ "headers":{ "Date":"Mon, 13 Jul 2015 20:02:41 GMT", "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", "Content-Type":"text/html" }, "body":[ "no need." ] }, "expected":{ "debug_log":"Target value: \"/one/two/ /three\" \\(Variable: PATH_INFO\\)" }, "rules":[ "SecRuleEngine On", "SecRule PATH_INFO \"@contains test \" \"id:1,phase:3,pass,t:trim\"" ] }, { "enabled":1, "version_min":300000, "title":"Testing Variables :: PATH_INFO (4/4)", "client":{ "ip":"200.249.12.31", "port":123 }, "server":{ "ip":"200.249.12.31", "port":80 }, "request":{ "headers":{ "Host":"localhost", "User-Agent":"curl/7.38.0", "Accept":"*/*", "Content-Length":"27", "Content-Type":"application/x-www-form-urlencoded" }, "uri":"/one/t%3fo/three?key=value", "method":"POST", "body":[ "param1=value1¶m2=value2" ] }, "response":{ "headers":{ "Date":"Mon, 13 Jul 2015 20:02:41 GMT", "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", "Content-Type":"text/html" }, "body":[ "no need." ] }, "expected":{ "http_code": 403 }, "rules":[ "SecRuleEngine On", "SecRule PATH_INFO \"@contains three\" \"id:1,phase:2,deny,status:403,t:trim\"" ] } ]