1[
2  {
3    "enabled":1,
4    "version_min":300000,
5    "title":"m_lineNumber ... mapping ... correct line number in file (1/n)",
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        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
22      },
23      "uri":"/",
24      "method":"POST",
25      "body": [
26        "param1=test1&param2=value2"
27      ]
28    },
29    "response":{
30      "headers":{
31        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
32        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
33        "Content-Type":"text/html"
34      },
35      "body":[
36        "no need."
37      ]
38    },
39    "expected":{
40      "error_log":"line \"29\""
41    },
42    "rules":[
43      "SecRuleEngine On",
44      "SecRule WEBAPPID \"@contains test1\" \"id:1,phase:3,pass,t:trim\"",
45      "Include test-cases/data/big-file.conf"
46    ]
47  },
48  {
49    "enabled":1,
50    "version_min":300000,
51    "title":"m_lineNumber ... mapping ... correct line number in file (2/n)",
52    "client":{
53      "ip":"200.249.12.31",
54      "port":123
55    },
56    "server":{
57      "ip":"200.249.12.31",
58      "port":80
59    },
60    "request":{
61      "headers":{
62        "Host":"localhost",
63        "User-Agent":"curl/7.38.0",
64        "Accept":"*/*",
65        "Content-Length": "27",
66        "Content-Type": "application/x-www-form-urlencoded",
67        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
68      },
69      "uri":"/",
70      "method":"POST",
71      "body": [
72        "param1=test2"
73      ]
74    },
75    "response":{
76      "headers":{
77        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
78        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
79        "Content-Type":"text/html"
80      },
81      "body":[
82        "no need."
83      ]
84    },
85    "expected":{
86      "error_log":"line \"55\""
87    },
88    "rules":[
89      "SecRuleEngine On",
90      "SecRule WEBAPPID \"@contains test2\" \"id:1,phase:3,pass,t:trim\"",
91      "Include test-cases/data/big-file.conf"
92    ]
93  },
94  {
95    "enabled":1,
96    "version_min":300000,
97    "title":"m_lineNumber ... mapping ... correct line number in file (3/n)",
98    "client":{
99      "ip":"200.249.12.31",
100      "port":123
101    },
102    "server":{
103      "ip":"200.249.12.31",
104      "port":80
105    },
106    "request":{
107      "headers":{
108        "Host":"localhost",
109        "User-Agent":"curl/7.38.0",
110        "Accept":"*/*",
111        "Content-Length": "27",
112        "Content-Type": "application/x-www-form-urlencoded",
113        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
114      },
115      "uri":"/",
116      "method":"POST",
117      "body": [
118        "param1=test3"
119      ]
120    },
121    "response":{
122      "headers":{
123        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
124        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
125        "Content-Type":"text/html"
126      },
127      "body":[
128        "no need."
129      ]
130    },
131    "expected":{
132      "error_log":"line \"84\""
133    },
134    "rules":[
135      "SecRuleEngine On",
136      "SecRule WEBAPPID \"@contains test3\" \"id:1,phase:3,pass,t:trim\"",
137      "Include test-cases/data/big-file.conf"
138    ]
139  },
140  {
141    "enabled":1,
142    "version_min":300000,
143    "title":"m_lineNumber ... mapping ... correct line number in file (4/n)",
144    "client":{
145      "ip":"200.249.12.31",
146      "port":123
147    },
148    "server":{
149      "ip":"200.249.12.31",
150      "port":80
151    },
152    "request":{
153      "headers":{
154        "Host":"localhost",
155        "User-Agent":"curl/7.38.0",
156        "Accept":"*/*",
157        "Content-Length": "27",
158        "Content-Type": "application/x-www-form-urlencoded",
159        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
160      },
161      "uri":"/",
162      "method":"POST",
163      "body": [
164        "param1=test4"
165      ]
166    },
167    "response":{
168      "headers":{
169        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
170        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
171        "Content-Type":"text/html"
172      },
173      "body":[
174        "no need."
175      ]
176    },
177    "expected":{
178      "error_log":"line \"116\""
179    },
180    "rules":[
181      "SecRuleEngine On",
182      "SecRule WEBAPPID \"@contains test3\" \"id:1,phase:3,pass,t:trim\"",
183      "Include test-cases/data/big-file.conf"
184    ]
185  },
186  {
187    "enabled":1,
188    "version_min":300000,
189    "title":"m_lineNumber ... mapping ... correct line number in file (5/n)",
190    "client":{
191      "ip":"200.249.12.31",
192      "port":123
193    },
194    "server":{
195      "ip":"200.249.12.31",
196      "port":80
197    },
198    "request":{
199      "headers":{
200        "Host":"localhost",
201        "User-Agent":"curl/7.38.0",
202        "Accept":"*/*",
203        "Content-Length": "27",
204        "Content-Type": "application/x-www-form-urlencoded",
205        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
206      },
207      "uri":"/",
208      "method":"POST",
209      "body": [
210        "param1=test5"
211      ]
212    },
213    "response":{
214      "headers":{
215        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
216        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
217        "Content-Type":"text/html"
218      },
219      "body":[
220        "no need."
221      ]
222    },
223    "expected":{
224      "error_log":"line \"174\""
225    },
226    "rules":[
227      "SecRuleEngine On",
228      "SecRule WEBAPPID \"@contains test3\" \"id:1,phase:3,pass,t:trim\"",
229      "Include test-cases/data/big-file.conf"
230    ]
231  },
232  {
233    "enabled":1,
234    "version_min":300000,
235    "title":"m_lineNumber ... mapping ... correct line number in file (6/n)",
236    "client":{
237      "ip":"200.249.12.31",
238      "port":123
239    },
240    "server":{
241      "ip":"200.249.12.31",
242      "port":80
243    },
244    "request":{
245      "headers":{
246        "Host":"localhost",
247        "User-Agent":"curl/7.38.0",
248        "Accept":"*/*",
249        "Content-Length": "27",
250        "Content-Type": "application/x-www-form-urlencoded",
251        "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
252      },
253      "uri":"/",
254      "method":"POST",
255      "body": [
256        "param1=test5"
257      ]
258    },
259    "response":{
260      "headers":{
261        "Date":"Mon, 13 Jul 2015 20:02:41 GMT",
262        "Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
263        "Content-Type":"text/html"
264      },
265      "body":[
266        "no need."
267      ]
268    },
269    "expected":{
270      "error_log":"line \"174\""
271    },
272    "rules":[
273      "SecRuleEngine On",
274      "SecRule WEBAPPID \"@contains test3\" \"id:1,phase:3,pass,t:trim\"",
275      "Include test-cases/data/not-so-big-file.conf"
276    ]
277  }
278]
279
280