ok2c commented on code in PR #729:
URL:
https://github.com/apache/httpcomponents-core/pull/729#discussion_r4435252190
##########
httpcore5/src/main/java/org/apache/hc/core5/http/message/MessageSupport.java:
##########
@@ -743,12 +743,11 @@ public static long getContentLength(final HttpMessage
message) throws HttpExcept
final Header contentLengthHeader =
message.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
if (contentLengthHeader != null) {
final String s = contentLengthHeader.getValue();
+ if (s != null && !s.isEmpty() && (s.charAt(0) == '+' ||
s.charAt(0) == '-')) {
Review Comment:
> `s != null && !s.isEmpty() && (s.charAt(0) == '+' || s.charAt(0) == '-')`
@arturobernalg Should we move this predicate to a support method in
`MessageSupport`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]