jira-importer opened a new issue, #965: URL: https://github.com/apache/httpcomponents-core/issues/965
**[Roland Hänel](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=roland237)** opened **[HTTPCORE-312](https://issues.apache.org/jira/browse/HTTPCORE-312?redirect=false)** and commented The LengthDelimitedEncoder class fails to deliver contents that are larger than 2GB, because the write(final ByteBuffer src) method incorrectly calculates int lenRemaining = (int) (this.contentLength - this.len); For example, if this.contentLength is 3,000,000,000 and this.len is 0, then lenRemaining will be negative and things will go wrong in the process. Changing the line to long lenRemaining = this.contentLength - this.len; will fix this bug (maybe src.remaining() needs to be casted to (long) in the following if statement). --- **Affects:** 4.2 -- 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]
