From 33791eb14a1b8491156b16017f6e63aa8dda23c9 Mon Sep 17 00:00:00 2001 From: Ervin Hegedus Date: Mon, 28 Jul 2025 16:09:10 +0200 Subject: [PATCH] Fix multipart tests --- tests/regression/misc/00-multipart-parser.t | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/regression/misc/00-multipart-parser.t b/tests/regression/misc/00-multipart-parser.t index e5ee4c13..35ba5ba3 100644 --- a/tests/regression/misc/00-multipart-parser.t +++ b/tests/regression/misc/00-multipart-parser.t @@ -270,7 +270,7 @@ debug => [ qr/Final boundary missing/, 1 ], }, match_response => { - status => qr/^200$/, + status => qr/^500$/, }, request => new HTTP::Request( POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", @@ -1120,10 +1120,10 @@ SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500121" ), match_log => { - debug => [ qr/boundary whitespace in C-T header/, 1 ], + debug => [ qr/Multipart: Warning: boundary whitespace in C-T header./, 1 ], }, match_response => { - status => qr/^403$/, + status => qr/^500$/, }, request => new HTTP::Request( POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", @@ -1216,10 +1216,10 @@ SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500127" ), match_log => { - debug => [ qr/No boundaries found in payload/, 1 ], + debug => [ qr/Multipart parsing error: Multipart: No boundaries found in payload./, 1 ], }, match_response => { - status => qr/^403$/, + status => qr/^500$/, }, request => new HTTP::Request( POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", @@ -1262,11 +1262,11 @@ SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500130" ), match_log => { - debug => [ qr/Invalid boundary in C-T \(characters\)/, 1 ], + debug => [ qr/Multipart parsing error: Multipart: No boundaries found in payload./, 1 ], }, match_response => { - status => qr/^403$/, + status => qr/^500$/, }, request => new HTTP::Request( POST => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt", @@ -1404,7 +1404,7 @@ SecRule REQBODY_PROCESSOR_ERROR "\@eq 1" "phase:2,deny,id:500139" ), match_log => { - debug => [ qr/boundary was quoted.*No boundaries found in payload/s, 1 ], + error => [ qr/Multipart parsing error \(init\): Multipart: Invalid boundary in C-T \(characters\)./s, 1 ], }, match_response => { status => qr/^403$/,