1[
2  {
3    "enabled":1,
4    "version_min":300000,
5    "title":"Testing Operator :: @rx",
6    "client":{
7      "ip":"200.249.12.31",
8      "port":123
9    },
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":"*/*",
19        "Content-Length": "27",
20        "Content-Type": "application/x-www-form-urlencoded"
21      },
22      "uri":"/",
23      "method":"POST",
24      "body": [
25        "param1=value1&param2=value2"
26      ]
27    },
28    "response":{
29      "headers":{
30        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
31        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
32        "Content-Type":"text/html"
33      },
34      "body":[
35        "no need."
36      ]
37    },
38    "expected":{
39      "debug_log":"Executing operator \"Rx"
40    },
41    "rules":[
42      "SecRuleEngine On",
43      "SecRule ARGS \"@rx (value1)\" \"id:1,phase:2,pass,t:trim\""
44    ]
45  },
46  {
47    "enabled":1,
48    "version_min":300000,
49    "title":"Testing Operator :: @rx in implicit form with negation ('!')",
50    "client":{
51      "ip":"200.249.12.31",
52      "port":123
53    },
54    "server":{
55      "ip":"200.249.12.31",
56      "port":80
57    },
58    "request":{
59      "headers":{
60        "Host":"localhost",
61        "User-Agent":"curl/7.38.0",
62        "Accept":"*/*",
63        "Content-Length": "27",
64        "Content-Type": "application/x-www-form-urlencoded"
65      },
66      "uri":"/",
67      "method":"HEAD",
68      "body": [ ]
69    },
70    "response":{
71      "headers":{
72        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
73        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
74        "Content-Type":"text/html"
75      },
76      "body":[
77        "no need."
78      ]
79    },
80    "expected":{
81      "debug_log":"Executing operator \"Rx\" with param \"\\^0\\$\"",
82      "error_log":"Matched \"Operator `Rx' with parameter `\\^0\\$'"
83    },
84    "rules":[
85      "SecRuleEngine On",
86      "SecRule REQUEST_HEADERS:Content-Length \"!^0$\" \"id:1,phase:2,pass,t:trim,block\""
87    ]
88  }
89]
90