From 744e3820a608ac8a91056a108fe5d1c50071db1c Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 8 Feb 2024 09:12:15 -0600 Subject: [PATCH] Rename MultiPartCompliance.NO_CRLF_AFTER_PREAMBLE to WHITESPACE_AFTER_PREAMBLE to fit spec better --- .../main/java/org/eclipse/jetty/http/MultiPartCompliance.java | 2 +- .../jetty/ee9/nested/MultiPartInputStreamLegacyParser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartCompliance.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartCompliance.java index 2c4bdb399ea4..ff0652a20581 100644 --- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartCompliance.java +++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartCompliance.java @@ -28,7 +28,7 @@ public enum Violation implements ComplianceViolation CONTENT_TRANSFER_ENCODING("https://tools.ietf.org/html/rfc7578#section-4.7", "Content-Transfer-Encoding header is deprecated"), CR_LINE_TERMINATION("https://tools.ietf.org/html/rfc2046#section-4.1.1", "CR only line termination is forbidden"), LF_LINE_TERMINATION("https://tools.ietf.org/html/rfc2046#section-4.1.1", "LF only line termination is forbidden"), - NO_CRLF_AFTER_PREAMBLE("https://tools.ietf.org/html/rfc2046#section-5.1.1", "CRLF sequence not allowed after preamble"), + WHITESPACE_AFTER_PREAMBLE("https://tools.ietf.org/html/rfc2046#section-5.1.1", "Whitespace not allowed after preamble"), BASE64_TRANSFER_ENCODING("https://tools.ietf.org/html/rfc7578#section-4.7", "'base64' Content-Transfer-Encoding is deprecated"), QUOTED_PRINTABLE_TRANSFER_ENCODING("https://tools.ietf.org/html/rfc7578#section-4.7", "'quoted-printable' Content-Transfer-Encoding is deprecated"); diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/MultiPartInputStreamLegacyParser.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/MultiPartInputStreamLegacyParser.java index d548a4794865..30162a3c9af0 100644 --- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/MultiPartInputStreamLegacyParser.java +++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/MultiPartInputStreamLegacyParser.java @@ -616,7 +616,7 @@ else if ("".equals(_config.getLocation())) // check compliance of preamble if (Character.isWhitespace(untrimmed.charAt(0))) nonComplianceWarnings.add(new ComplianceViolation.Event(MultiPartCompliance.LEGACY, - MultiPartCompliance.Violation.NO_CRLF_AFTER_PREAMBLE, + MultiPartCompliance.Violation.WHITESPACE_AFTER_PREAMBLE, String.format("0x%02x", untrimmed.charAt(0)))); // Read each part