Skip to content

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
BufferedOutStream(JdkContext context, int initial, long max) {
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
@SentryMan SentryMan deleted the range branch August 26, 2025 18:09
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