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

[HTTP3] Implementation of range request in picohttp #1702

Open
fbussery opened this issue Jun 19, 2024 · 1 comment
Open

[HTTP3] Implementation of range request in picohttp #1702

fbussery opened this issue Jun 19, 2024 · 1 comment

Comments

@fbussery
Copy link
Collaborator

Right now picohttp doesn't provide the range request.
I did attached to this issue a quick implementation of the range request.
According to https://datatracker.ietf.org/doc/html/rfc9204#appendix-A
We just need to implement the qpack code 55

In the attached patch, I just did modify the api of h3zero.h to pass the range

Previous api was:

uint8_t * h3zero_create_post_header_frame_ex(uint8_t * bytes, uint8_t * bytes_max, uint8_t const * path, size_t path_length, char const * host, h3zero_content_type_enum content_type, char const* ua_string)

new
is

uint8_t * h3zero_create_post_header_frame_ex(uint8_t * bytes, uint8_t * bytes_max, uint8_t const * path, size_t path_length, 
uint8_t const * range, size_t range_length, char const * host, h3zero_content_type_enum content_type, char const* ua_string)

So, we can pass range this way for instance:
range = "bytes=100-1000" range_length = 14

I see no regressions with tests: picohttp_ct & picoquicdemo

Note that there is nothing right now in the code that check that range is accepted.

patch: 0001-Implementation-of-byte-range-according-to-rfc9204.patch.txt

@huitema
Copy link
Collaborator

huitema commented Jun 23, 2024

See PR #1703 which is based on the patch. But we need to extend that PR to add actual support of ranges in the demo app, both on client and on server.

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