Skip to content

Commit fc06915

Browse files
lkarstenFelipe Zimmerle
authored andcommitted
Extend RESPONSE_BODY test case.
1 parent 31655e2 commit fc06915

File tree

1 file changed

+17
-26
lines changed

1 file changed

+17
-26
lines changed
Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,34 @@
1-
[
2-
{
1+
[
2+
{
33
"enabled":1,
44
"version_min":300000,
55
"title":"Testing Variables :: RESPONSE_BODY",
6-
"client":{
7-
"ip":"200.249.12.31",
8-
"port":123
6+
"client": {
7+
"ip":"200.249.12.31"
98
},
10-
"server":{
11-
"ip":"200.249.12.31",
12-
"port":80
13-
},
14-
"request":{
15-
"headers":{
16-
"Host":"localhost",
17-
"User-Agent":"curl/7.38.0",
18-
"Accept":"*/*"
9+
"request": {
10+
"headers": {
11+
"Host":"localhost"
1912
},
20-
"uri":"/?key=value&key=other_value",
21-
"method":"GET",
13+
"uri":"/foo",
2214
"http_version":1.1
2315
},
24-
"response":{
25-
"headers":{
16+
"response":{
17+
"headers":{
2618
"Date":"Mon, 13 Jul 2015 20:02:41 GMT",
2719
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
28-
"Content-Type":"text/html"
20+
"Content-Type":"text/plain"
2921
},
30-
"body":[
31-
"no need."
22+
"body":[
23+
"denystring"
3224
]
3325
},
34-
"expected":{
35-
"debug_log":"Target value: \"no need.\" \\(Variable: RESPONSE_BODY\\)"
26+
"expected":{
27+
"http_code": 403
3628
},
37-
"rules":[
29+
"rules":[
3830
"SecRuleEngine On",
39-
"SecRule RESPONSE_BODY \"@contains test \" \"id:1,phase:4,pass,t:trim\""
31+
"SecRule RESPONSE_BODY \"@contains denystring\" \"id:1,phase:4,deny\""
4032
]
4133
}
4234
]
43-

0 commit comments

Comments
 (0)