Skip to content

Conversation

@hnakamur
Copy link
Contributor

what

  • Remove the redundant "--" prefix from boundaries.
  • Add the missing Content-Type header for multipart bodies.

why

  • To make it clear that the tests assume the multipart body is correct and are intended to verify other aspects.

references

None

- Remove the redundant "--" prefix from boundaries.
- Add the missing Content-Type header for multipart bodies.
@sonarqubecloud
Copy link

@airween
Copy link
Member

airween commented Dec 31, 2025

Hi @hnakamur,

thanks for this PR - let me review all changes later, but after a quick review, it seems everything is okay.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes multipart boundary formatting in regression test files to align with RFC 2046 standards. The boundary parameter in Content-Type headers is corrected from 26 dashes to 24 dashes, while the body delimiters correctly use 26 dashes (boundary parameter + "--" prefix).

Changes:

  • Updated boundary parameters in Content-Type headers from 26 to 24 dashes across multiple test files
  • Added missing Content-Type headers for multipart requests in config-body_limits.json
  • Updated expected values (FULL_REQUEST_LENGTH from 690 to 688, debug_log boundary strings) to reflect the 2-character reduction

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json Updated boundary parameter from 26 to 24 dashes in three test cases
test/test-cases/regression/variable-RESPONSE_HEADERS.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json Updated boundary parameter from 26 to 24 dashes in six test cases
test/test-cases/regression/variable-REQUEST_HEADERS.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-REQUEST_BODY.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-REQBODY_PROCESSOR.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json Updated boundary parameter from 26 to 24 dashes in two test cases (with space and with quotes)
test/test-cases/regression/variable-INBOUND_DATA_ERROR.json Updated boundary parameter from 26 to 24 dashes
test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json Updated boundary parameter and expected length value from 690 to 688
test/test-cases/regression/variable-FULL_REQUEST.json Updated boundary parameter and expected debug_log boundary string
test/test-cases/regression/config-body_limits.json Added Content-Type headers with correct boundary to four test cases
test/test-cases/regression/action-ctl_request_body_access.json Updated boundary parameter from 26 to 24 dashes in three test cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@airween
Copy link
Member

airween commented Jan 22, 2026

Thank you @hnakamur!

@airween airween merged commit 0ad6e8f into owasp-modsecurity:v3/master Jan 22, 2026
56 checks passed
@hnakamur hnakamur deleted the v3/fix_multipart_boundary_in_regression_tests branch January 23, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants