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

surprising behavior of renderByteRange #86

Open
joeyh opened this issue Apr 6, 2018 · 1 comment
Open

surprising behavior of renderByteRange #86

joeyh opened this issue Apr 6, 2018 · 1 comment

Comments

@joeyh
Copy link

joeyh commented Apr 6, 2018

I had expected (hRange, renderByteRange (ByteRangeFrom 1000)) would be a http request Range header, but in fact renderByteRange does not include the "bytes=" part, so that generates an invalid "Range: 1000-" header.

renderByteRanges does include the "bytes=" part, so the workaround is to use
(hRange, renderByteRanges [ByteRangeFrom 1000])

The only way to learn of either behavior is to read the source code. This at least needs to be documented better.

It might be useful to parameterize the rendering functions with the role the range is being rendered for, eg a Request or a Response. See also #64.

@Vlix
Copy link

Vlix commented Nov 30, 2023

Documentation fixed in [Vlix#1]

Could you describe and give examples for what you mean with parameterize the rendering functions?

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

2 participants