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

Deprecate Resource.writeTo(OutputStream, long, long) #3924

Closed
joakime opened this issue Jul 31, 2019 · 0 comments · Fixed by #4558
Closed

Deprecate Resource.writeTo(OutputStream, long, long) #3924

joakime opened this issue Jul 31, 2019 · 0 comments · Fixed by #4558
Assignees

Comments

@joakime
Copy link
Contributor

joakime commented Jul 31, 2019

Based on a review of PR #3923 it was identified that the entire writing of Resources and HttpContent is a bit hairy with a lot of similar code and apparent code duplication.

In order to simplify things, it was decided that Resource.writeTo(OutputStream, long, long) should be deprecated in Jetty 9.4.x and removed in Jetty 10.0.x

It was proposed by @sbordet that the writing of content should be handled somewhere at the HttpContent level, perhaps as a jetty-io (or even a jetty-server) feature.

Some of the brainstormed possible interfaces for HttpContent were ...

// Whole content send
HttpContent.send(Channel, Callback);

// Range content send - simple / single range
HttpContent.send(Channel, long start, long length, Callback);

// Range content send - smart / multiple ranges
HttpContent.send(MultiPartOutputStream, InclusiveByteRanges, Callback); 
@joakime joakime self-assigned this Aug 8, 2019
joakime added a commit that referenced this issue Feb 7, 2020
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Feb 11, 2020
…ource-writeto

Issue #3924 - Remove Resource.writeTo(OutputStream, long, long)
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 a pull request may close this issue.

1 participant