Skip to content

Support Range Requests #252

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

Merged
merged 2 commits into from
Apr 14, 2025
Merged

Support Range Requests #252

merged 2 commits into from
Apr 14, 2025

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Apr 14, 2025

Adds support for Http-Range Requests

  • adds range writer methods
  • adds configuration for the range chunk size (video streams sucks at lower values because the server gets flooded by range requests)
  • adds a content length method to skip the buffer
  • disables compression on range requests

Resolves #247

@SentryMan SentryMan added the enhancement New feature or request label Apr 14, 2025
@SentryMan SentryMan added this to the 3.1 milestone Apr 14, 2025
@SentryMan SentryMan requested a review from rbygrave April 14, 2025 03:16
@SentryMan SentryMan self-assigned this Apr 14, 2025
@SentryMan SentryMan enabled auto-merge (squash) April 14, 2025 03:21
@@ -18,6 +18,11 @@ final class BufferedOutStream extends OutputStream {
this.context = context;
this.max = max;
this.buffer = new ByteArrayOutputStream(initial);
Copy link
Contributor

Choose a reason for hiding this comment

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

Check if this should be initialised at all.

import io.avaje.jex.http.Context;
import io.avaje.jex.http.HttpStatus;

class RangeWriter {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be final

@rbygrave rbygrave disabled auto-merge April 14, 2025 09:06
@rbygrave rbygrave merged commit 7f1c5de into avaje:master Apr 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support range requests
2 participants