Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #3888 - Huge file Resources behaviors #3889

Merged
merged 9 commits into from
Jul 31, 2019

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Jul 18, 2019

Signed-off-by: Joakim Erdfelt joakim.erdfelt@gmail.com

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Allowing CachedHttpContent._contentLengthValue actually hold
  the `long` resource size (for the 4G variant on test)
+ Allowing BufferUtil to not throw Exception if resource length
  is a positive value, but exceeds Integer.MAX_VALUE, opting instead
  to return a null to prevent excessive memory usage. (fixes the 10G
  variant of test)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Only used Mapped ByteBuffers, ReadableByteChannel, or InputStream

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ For Content-Length values exceeding Integer.MAX_VALUE the return
  must be -1.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Also applying changes from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime requested a review from sbordet July 23, 2019 20:30
+ ResourceCacheTest identified a bug in CachedContentFactory
  (a bad/reversed if statement)
+ Updated ResourceCacheTest to not rely on jetty-util src/test/resources

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime changed the title Issue #3888 - Adding testcase to demonstrate Huge file Resource issue Issue #3888 - Huge file Resources behaviors Jul 24, 2019
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than quibbles

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime merged commit dc4b7b1 into jetty-9.4.x Jul 31, 2019
@joakime joakime deleted the jetty-9.4.x-3888-huge-resources branch July 31, 2019 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants