1 ### SecDebug* directive tests
4 comment => "SecDebugLog (pos)",
7 SecDebugLog $ENV{DEBUG_LOG}
11 debug => [ qr/./, 1 ],
16 request => new HTTP::Request(
17 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
22 comment => "SecDebugLog (neg)",
27 -debug => [ qr/./, 1 ],
32 request => new HTTP::Request(
33 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
38 comment => "SecDebugLogLevel 0",
41 SecDebugLog $ENV{DEBUG_LOG}
43 SecRule REQUEST_URI "." "phase:1,deny"
46 -debug => [ qr/./, 1 ],
51 request => new HTTP::Request(
52 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
57 comment => "SecDebugLogLevel 1",
60 SecDebugLog $ENV{DEBUG_LOG}
62 SecRuleScript "test.lua" "phase:1"
63 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
66 debug => [ qr/\]\[[1]\] /, 1 ],
67 -debug => [ qr/\]\[[2-9]\] /, 1 ],
72 request => new HTTP::Request(
73 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
75 "Content-Type" => "application/x-www-form-urlencoded",
82 comment => "SecDebugLogLevel 2",
84 SecRuleEngine DetectionOnly
85 SecDebugLog $ENV{DEBUG_LOG}
87 SecRuleScript "test.lua" "phase:1"
88 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
91 debug => [ qr/\]\[2\] /, 1 ],
92 -debug => [ qr/\]\[[3-9]\] /, 1 ],
97 request => new HTTP::Request(
98 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
100 "Content-Type" => "application/x-www-form-urlencoded",
107 comment => "SecDebugLogLevel 3",
110 SecDebugLog $ENV{DEBUG_LOG}
112 SecRuleScript "test.lua" "phase:1"
113 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
116 debug => [ qr/\]\[3\] /, 1 ],
117 -debug => [ qr/\]\[[4-9]\] /, 1 ],
122 request => new HTTP::Request(
123 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
125 "Content-Type" => "application/x-www-form-urlencoded",
132 comment => "SecDebugLogLevel 4",
135 SecDebugLog $ENV{DEBUG_LOG}
137 SecRuleScript "test.lua" "phase:1"
138 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
141 debug => [ qr/\]\[4\] /, 1 ],
142 -debug => [ qr/\]\[[5-9]\] /, 1 ],
147 request => new HTTP::Request(
148 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
150 "Content-Type" => "application/x-www-form-urlencoded",
157 comment => "SecDebugLogLevel 5",
160 SecDebugLog $ENV{DEBUG_LOG}
162 SecRuleScript "test.lua" "phase:1"
163 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
166 debug => [ qr/\]\[5\] /, 1 ],
167 -debug => [ qr/\]\[[6-9]\] /, 1 ],
172 request => new HTTP::Request(
173 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
175 "Content-Type" => "application/x-www-form-urlencoded",
182 comment => "SecDebugLogLevel 6",
185 SecDebugLog $ENV{DEBUG_LOG}
187 SecRuleScript "test.lua" "phase:1"
188 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
191 debug => [ qr/\]\[6\] /, 1 ],
192 -debug => [ qr/\]\[[7-9]\] /, 1 ],
197 request => new HTTP::Request(
198 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
200 "Content-Type" => "application/x-www-form-urlencoded",
207 comment => "SecDebugLogLevel 7",
210 SecDebugLog $ENV{DEBUG_LOG}
212 SecRuleScript "test.lua" "phase:1"
213 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
216 debug => [ qr/\]\[7\] /, 1 ],
217 -debug => [ qr/\]\[[8-9]\] /, 1 ],
222 request => new HTTP::Request(
223 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
225 "Content-Type" => "application/x-www-form-urlencoded",
232 comment => "SecDebugLogLevel 8",
235 SecDebugLog $ENV{DEBUG_LOG}
237 SecRuleScript "test.lua" "phase:1"
238 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
241 debug => [ qr/\]\[8\] /, 1 ],
242 -debug => [ qr/\]\[9\] /, 1 ],
247 request => new HTTP::Request(
248 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
250 "Content-Type" => "application/x-www-form-urlencoded",
257 comment => "SecDebugLogLevel 9",
260 SecDebugLog $ENV{DEBUG_LOG}
262 SecRuleScript "test.lua" "phase:1"
263 SecRule REQUEST_URI "(.)" "phase:4,deny,deprecatevar:bogus"
266 debug => [ qr/\]\[9\] /, 1 ],
271 request => new HTTP::Request(
272 POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
274 "Content-Type" => "application/x-www-form-urlencoded",