Skip to content

Support byte ranges in ResourceHttpRequestHandler #754

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

Closed
wants to merge 1 commit into from

Conversation

poutsma
Copy link
Contributor

@poutsma poutsma commented Mar 13, 2015

This commit introduces support for HTTP byte ranges in the
ResourceHttpRequestHandler. This support consists of a number of
changes:

  • Parsing of HTTP Range headers in HttpHeaders, including a nested Range
    class and ByteRange/SuffixByteRange subclasses.
  • MIME boundary generation moved from FormHttpMessageConverter to
    MimeTypeUtils.
  • writePartialContent() method introduced in ResourceHttpRequestHandler,
    handling the byte range logic
  • Additional partial content tests added to
    ResourceHttpRequestHandlerTests.

Issue: SPR-10805

This commit introduces support for HTTP byte ranges in the
ResourceHttpRequestHandler. This support consists of a number of
changes:

- Parsing of HTTP Range headers in HttpHeaders, using a new HttpRange
  class and inner ByteRange/SuffixByteRange subclasses.
- MIME boundary generation moved from FormHttpMessageConverter to
  MimeTypeUtils.
- writePartialContent() method introduced in ResourceHttpRequestHandler,
  handling the byte range logic
- Additional partial content tests added to
  ResourceHttpRequestHandlerTests.

Issue: SPR-10805
@rstoyanchev
Copy link
Contributor

This is now merged, thanks!

@davinkevin
Copy link

It's not compatible with a @controller and return type FileSystemResource ?

@bclozel
Copy link
Member

bclozel commented Dec 31, 2015

Hi @davinkevin - right now this is only supported for serving static resources with a ResourceHttpRequestHandler. I'm not sure this can be done on @Controller handlers as well - please open a JIRA issue on the Spring Framework project (component "Web") and we can discuss it there.

Thanks!

@drahkrub
Copy link

drahkrub commented Jan 3, 2016

@davinkevin @bclozel @rstoyanchev @poutsma https://jira.spring.io/browse/SPR-13834 - Add support for http byte-range requests for non-static resources

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.

5 participants