-
Notifications
You must be signed in to change notification settings - Fork 194
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
How can I post with chunked data? #309
Comments
I guess this line sets This value is used for |
If i understand correctly the In the case the user wants 0 length he can just pass ["content-length","0"] and in the othere case where it should not be set one could use ["content-length",""] and filter it out here You can simply clone this repository and patch your project with your cloned variant with [patch.crates-io]
esp-idf-svc = { path = "../path/to/esp-idf-svc" }
insides your project Cargo.toml and running |
Thanks for your reply @Vollbrecht !! I'm happy to implement patch if I can. But I want to understand actual specification of it before implement. As you say, it may work by just setting larger value to content-length because it is max size I can write. But it isn't what I'm looking for because it isn't streaming post. I investigated implementation of And then, it is passed to Finally, it is used as follows. This implementation shows library sets So setting negative value to |
Closed with 0769782 |
Overview
Hi, I love this crate, thank you for providing eco-system to implement firmware by Rust.
btw, now I'm worrying how I send POST request with chunked data that is achieved by using
Transfer-Encoding: chunked
header and withoutContent-Length
header basically.Goal
I want to write data multiple times for the request as follow.
Problem
To send chunked data, I want to add
Transfer-Encoding: chunked
to the header and don't want to addContent-Length
because I can't measure the total size of chunked data while sending requests.But it seems this crate add
Content-Length
with0
value if I don't set it to the header.Example is as follows.
Above implementation sends follow request (I captured it by
Wireshark
). It hasContent-Length: 0
in its header.Solution
Don't add
Content-Length: 0
to the header even if there is noContent-Length
. Or maybe some other ways to send request with chunked data?The text was updated successfully, but these errors were encountered: