greyp9 commented on a change in pull request #5040:
URL: https://github.com/apache/nifi/pull/5040#discussion_r622547695
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -556,7 +557,8 @@
REL_SUCCESS_REQ, REL_RESPONSE, REL_RETRY, REL_NO_RETRY,
REL_FAILURE)));
// RFC 2616 Date Time Formatter with hard-coded GMT Zone
- private static final DateTimeFormatter RFC_2616_DATE_TIME =
DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'");
+ // https://tools.ietf.org/html/rfc2616#section-3.3 - date format header
should not be localized
+ private static final DateTimeFormatter RFC_2616_DATE_TIME =
DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
Review comment:
There was a unit test that verified a generated date (locale-specific)
against the RFC 2616 pattern. In FR locale, the pattern did not match, so the
test failed.
I interpret the rfc to require the unlocalized version of the formatted
date, thus this change.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]