Copilot commented on code in PR #476:
URL:
https://github.com/apache/commons-fileupload/pull/476#discussion_r3571568288
##########
commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MimeUtils.java:
##########
@@ -224,10 +224,10 @@ private static String decodeWord(final String word)
throws ParseException, Unsup
final var encodedData =
encodedText.getBytes(StandardCharsets.US_ASCII);
- // Base64 encoded?
- if (encoding.equals(BASE64_ENCODING_MARKER)) {
+ // Base64 encoded? RFC 2047 section 2 defines the encoding token
as case-independent, so 'b' and 'q' are also valid.
Review Comment:
The new comment in the Base64 branch mentions both 'b' and 'q', but this
`if` only concerns the Base64 marker. Rewording slightly would avoid confusion
while still documenting the case-insensitive requirement from RFC 2047.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]