-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support Range: in cowboy_rest #306
Comments
Where is the right place to put restrictions on the range of served data? |
Please, someone, review dvv@0bf71f3 -- will this be welcome in the core? How to pass and honor Offset/Length in |
As-is no, for many reasons including adding a cowboy_util module when we have cowboy_http for all parsing needs. But I didn't think about Ranges much yet, although we do want to support them, so it'll take a few weeks before I do a proposal including that. |
i see. it was my first experience in Erlang. Range: is the cleanest way to specify portions of data w/o abusing querystring, Content-Range: is well-suited for consistent client-side paging. nothing pressing. |
It's not to be used for paging though, the Range value is in bytes and represents the byte range from the entity body returned. It's mostly used for resuming downloads. |
2616 defines only "bytes" item, yes. but below is quite valid case i learned from Pintura and it fits REST (thus cowboy_rest) very well:
|
Range can be set not only to 'bytes' Here is a part of RFC 2616
Using Range header is a best way to organize pagination in RESTfull API. |
Missed the part on units. OK. |
The Ranch stuff got merged. We're one step closer to having this done! |
Hi Loïc, |
Well it's open because nothing has been done yet. I want full support following the rfc. Loïc Hoguin -------- Original Message --------
|
Sounds great, thanks! |
You can see partial implementation in #1059 |
I've started work on full support for RFC7233. Here are the current plans:
And:
This last part will probably require me to implement #984 and #1113 at the same time. Thoughts? |
I've just pushed 29043aa which contains a full RFC7233 implementation for |
I've now added the ability to use sendfile while streaming the response body, so all that's left is implementing the auto mode and then applying it on cowboy_static. |
I've pushed three more commits:
Other than documentation, which will be done once I've confirmed that this fits a customer use case, I believe everything has been added. Please experiment and open new tickets if you find any issues. Thanks! |
Hi!
Is the subj planned?
TIA,
--Vladimir
The text was updated successfully, but these errors were encountered: