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

Accept range end position which exceededs the resource size #147

Merged
merged 1 commit into from
Jan 16, 2015

Conversation

kuenishi
Copy link
Contributor

RFC 2616 14.35.1 Byte Ranges

If the last-byte-pos value is absent, or if the value is greater than
or equal to the current length of the entity-body, last-byte-pos is
taken to be equal to one less than the current length of the entity-
body in bytes.

This work is originally done by @shino and feedback of basho/mochiweb#17 and basho/mochiweb#7 .

RFC 2616 14.35.1 Byte Ranges

    If the last-byte-pos value is absent, or if the value is greater than
    or equal to the current length of the entity-body, last-byte-pos is
    taken to be equal to one less than the current length of the entity-
    body in bytes.

This work is originally done by @shino
@kuenishi
Copy link
Contributor Author

We also removed the head

parse_range_request("bytes=0-") ->
    undefined;

to avoid handling special case undefined for our convenience. If this breaks something else, I can get rid of this.

etrepum added a commit that referenced this pull request Jan 16, 2015
Accept range end position which exceededs the resource size
@etrepum etrepum merged commit 35c6bca into mochi:master Jan 16, 2015
etrepum added a commit that referenced this pull request Jan 16, 2015
@etrepum
Copy link
Member

etrepum commented Jan 16, 2015

This had a test failure that somehow didn't show up when I was merging the request. Fixing it now. https://travis-ci.org/mochi/mochiweb/builds/47273580

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.

2 participants