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

C API: Provide a way to get the raw response header bytes #2575

Closed
seanmonstar opened this issue Jun 10, 2021 · 0 comments · Fixed by #2576
Closed

C API: Provide a way to get the raw response header bytes #2575

seanmonstar opened this issue Jun 10, 2021 · 0 comments · Fixed by #2576
Assignees
Labels
A-ffi Area: ffi (C API) C-feature Category: feature. This is adding a new feature.

Comments

@seanmonstar
Copy link
Member

What if... the C API provided an option to ask for the original header data, as a single unaltered buffer? It'd be cheap in hyper, just a ref count bump on that buffer, and in curl you wouldn't need to re-stitch together the headers into lines, or have a discrepancy of whether it was \r\n or just \n, and the order would what was sent.

It could just be an option set on either hyper_request * or hyper_clientconn_options * (perhaps the conn since you only need to set it once per connection). And then you could fetch it from a hyper_response *:

struct hyper_buf *hyper_response_headers_raw(struct hyper_response *resp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ffi Area: ffi (C API) C-feature Category: feature. This is adding a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant