sbstp / attohttpc

Rust lightweight HTTP 1.1 client

Home Page:https://docs.rs/attohttpc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"invalid chunk size" error on some websites

Shnatsel opened this issue · comments

When querying some websites, such as http://movie-japan.com, attohttpc fails with the following error:

Io Error: InvalidResponse: invalid chunk size

176 websites out of the top million from Feb 3 Tranco list are affected.

Tested using this code. Test tool output from all affected websites: atto-invalid-chunk-size.tar.gz

Firefox and curl work fine.

At least for http://movie-japan.com, this is our less-than-principled chunk size parser not trimming whitespace before parsing into an integer, c.f. #98