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

Allow non-chunked transfer for larger files #149

Closed
lolgesten opened this issue Oct 30, 2018 · 0 comments
Closed

Allow non-chunked transfer for larger files #149

lolgesten opened this issue Oct 30, 2018 · 0 comments

Comments

@lolgesten
Copy link

Hi!

We're happy users of Rouille, however when sending larger files, we hit this issue:

https://github.com/tiny-http/tiny-http/blob/master/src/response.rs#L167-L168

    // if we don't have a Content-Length, or if the Content-Length is too big, using chunks writer
    let chunks_threshold = 32768;
    if entity_length.as_ref().map_or(true, |val| *val >= chunks_threshold) {
        return TransferEncoding::Chunked;
    }

This makes for a bad user experience, since they don't get any progress meter on downloads in the browser.

Would you consider a PR that lets us configure this behaviour? I.e. maybe raising the limit on a per-response basis?

lolgesten pushed a commit to lolgesten/tiny-http that referenced this issue Oct 31, 2018
frewsxcv added a commit that referenced this issue Dec 21, 2018
Expose chunked_threshold on Response. Fix #149
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

No branches or pull requests

1 participant