rust-ceramic
rust-ceramic copied to clipboard
fix: block_put_post handle multipart bytes
Code in Kubo rpc client use read_to_string
handle file bytes, cause error like: Unable to build body: stream did not contain valid UTF-8
.
https://github.com/ceramicnetwork/rust-ceramic/blob/55dd5d868ef635da819c67601731da1205fce6f9/kubo-rpc-server/src/client/mod.rs#L582
This issue also reappear in official test case: https://github.com/ceramicnetwork/rust-ceramic/blob/55dd5d868ef635da819c67601731da1205fce6f9/kubo-rpc/src/http.rs#L814-L857.
Using read_to_end
could handle raw bytes and work well with my environment (ceramic-one as Kubo server).