simple http error when transfer encoding is chunked
RCasatta opened this issue · 4 comments
When trying to decode a big json from a json rpc server returns the fllowing error:
0: JSON decode error: invalid type: integer `2000`, expected struct Response at line 1 column 5
while curl
opens the url correctly and the body parse to a json.
By looking at headers with curl
I noted the transfer encoding is chunked and that may be the cause of the issue
I wonder if we should just add a libcurl backend and forget about Rust.
Does simple http even attempt to deal with http's chunked encoding?
Unless Bitcoin Core uses it, I think it would be fair to say that it is not supported and different backend should be used in that case.
I wonder if we should just add a libcurl backend and forget about Rust.
🙄
Does simple http even attempt to deal with http's chunked encoding?
It does not, no.
Fine by me to just say "unsupported".
Ideally should give an appropriate error when the chunked header is found, easier to find out than reading the docs