hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.42k stars 1.59k forks source link

Unhelpful error when trying to send a body on a GET request #1955

Open Demi-Marie opened 5 years ago

Demi-Marie commented 5 years ago

https://github.com/hyperium/hyper/issues/1926 was correct, but “channel closed” is not a helpful error message. Adding a new error that means “Request body not allowed” would be a significant help to users of the library.

seanmonstar commented 4 years ago

It would be quite difficult to get that error message in, since internally hyper simply drops the body, and the channel version doesn't have a way to know the difference.

If it doesn't already, we could include a log message about the ambiguity.

Demi-Marie commented 4 years ago

A log message might be a good idea.