Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jersey-dev] Range request implementation

Hi,

I'm looking to implement range requests with Jersey 2.x:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests

Is there a "canonical" implementation of this?

>From looking at a few sources
https://colamda.de/blog/2016-07-08-files-with-jax-rs/
https://github.com/heruan/jaxrs-range-filter
I gather that the implementation involves:
* a ContainerResponseFilter (or possibly WriterInterceptor?) that
parses the Range header
* a subclass of StreamingOutput that slices the entity bytes according
to the range

Does that sound reasonable? I'd very much reuse a time-tested library however.

Martynas
atomgraph.com


Back to the top