Skip to content

Commit 33791eb

Browse files
committed
Fix multipart tests
1 parent 10659ad commit 33791eb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/regression/misc/00-multipart-parser.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
debug => [ qr/Final boundary missing/, 1 ],
271271
},
272272
match_response => {
273-
status => qr/^200$/,
273+
status => qr/^500$/,
274274
},
275275
request => new HTTP::Request(
276276
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
@@ -1120,10 +1120,10 @@
11201120
SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500121"
11211121
),
11221122
match_log => {
1123-
debug => [ qr/boundary whitespace in C-T header/, 1 ],
1123+
debug => [ qr/Multipart: Warning: boundary whitespace in C-T header./, 1 ],
11241124
},
11251125
match_response => {
1126-
status => qr/^403$/,
1126+
status => qr/^500$/,
11271127
},
11281128
request => new HTTP::Request(
11291129
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
@@ -1216,10 +1216,10 @@
12161216
SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500127"
12171217
),
12181218
match_log => {
1219-
debug => [ qr/No boundaries found in payload/, 1 ],
1219+
debug => [ qr/Multipart parsing error: Multipart: No boundaries found in payload./, 1 ],
12201220
},
12211221
match_response => {
1222-
status => qr/^403$/,
1222+
status => qr/^500$/,
12231223
},
12241224
request => new HTTP::Request(
12251225
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
@@ -1262,11 +1262,11 @@
12621262
SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500130"
12631263
),
12641264
match_log => {
1265-
debug => [ qr/Invalid boundary in C-T \(characters\)/, 1 ],
1265+
debug => [ qr/Multipart parsing error: Multipart: No boundaries found in payload./, 1 ],
12661266
12671267
},
12681268
match_response => {
1269-
status => qr/^403$/,
1269+
status => qr/^500$/,
12701270
},
12711271
request => new HTTP::Request(
12721272
POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
@@ -1404,7 +1404,7 @@
14041404
SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500139"
14051405
),
14061406
match_log => {
1407-
debug => [ qr/boundary was quoted.*No boundaries found in payload/s, 1 ],
1407+
error => [ qr/Multipart parsing error \(init\): Multipart: Invalid boundary in C-T \(characters\)./s, 1 ],
14081408
},
14091409
match_response => {
14101410
status => qr/^403$/,

0 commit comments

Comments
 (0)