betta-cyber / netease-music-tui

netease cloud music terminal client by rust :zap:
MIT License
420 stars 34 forks source link

Some times Error,throw stream did not contain valid UTF-8 #22

Closed readmagic closed 3 years ago

readmagic commented 3 years ago

Some times run the application ,Throw 《stream did not contain valid UTF-8》, I'm new to Rust。But I found the problem。 netease some times will respond the "content-encoding:br" in header.So the reqwest crash。 bug fix in api.rs headers.insert(ACCEPT_ENCODING, "gzip,deflate,br".parse().unwrap()); change to headers.insert(ACCEPT_ENCODING, "gzip,deflate".parse().unwrap());

then solved。

betta-cyber commented 3 years ago

thank you !!