Skip to content

Commit 0a296af

Browse files
committed
Add regression test case
1 parent 514abeb commit 0a296af

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

Diff for: test/test-cases/regression/variable-MULTIPART_PART_HEADERS.json

+51
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,57 @@
162162
"SecRuleEngine On",
163163
"SecRule MULTIPART_PART_HEADERS:parm2 \"@rx content-type:.*jpeg\" \"phase:2,deny,status:403,id:500074,t:lowercase\""
164164
]
165+
},
166+
{
167+
"enabled":1,
168+
"version_min":300000,
169+
"title":"Testing Variables :: MULTIPART_PART_HEADERS (check EOL)",
170+
"client":{
171+
"ip":"200.249.12.31",
172+
"port":123
173+
},
174+
"server":{
175+
"ip":"200.249.12.31",
176+
"port":80
177+
},
178+
"request":{
179+
"headers":{
180+
"Host":"localhost",
181+
"User-Agent":"curl/7.38.0",
182+
"Accept":"*/*",
183+
"Content-Length":"249",
184+
"Content-Type":"multipart/form-data; boundary=-----------------------------69343412719991675451336310646",
185+
"Expect":"100-continue"
186+
},
187+
"uri":"/",
188+
"method":"POST",
189+
"body":[
190+
"-------------------------------69343412719991675451336310646",
191+
"Content-Disposition: form-data; name=\"file\"; filename=\"New Text Document.txt\"",
192+
"Content-Type: text/plain; charset=utf-8\r\n",
193+
"",
194+
"1",
195+
"-------------------------------69343412719991675451336310646--"
196+
]
197+
},
198+
"response":{
199+
"headers":{
200+
"Date":"Mon, 13 Jul 2015 20:02:41 GMT",
201+
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
202+
"Content-Type":"text/html"
203+
},
204+
"body":[
205+
"no need."
206+
]
207+
},
208+
"expected":{
209+
"http_code": 200
210+
},
211+
"rules":[
212+
"SecRuleEngine On",
213+
"SecRule MULTIPART_PART_HEADERS \"@rx ^content-type\\s*+:\\s*+(.*)$\" \"id:922110,phase:2,deny,capture,t:none,t:lowercase,chain\"",
214+
"SecRule TX:1 \"!@rx ^text/plain; charset=(?:iso-8859-15?|windows-1252|utf-8)$\" \"t:lowercase\""
215+
]
165216
}
166217
]
167218

0 commit comments

Comments
 (0)