tk-http
tk-http copied to clipboard
Encoder.done_headers should return false when content-length=0
encoder.add_length(0).unwrap();
if encoder.done_headers().unwrap() {
// this should be unreachable
}
Well, I think an empty body is still a body. We return false when it's 304, or similar thing where body is omitted or prohibited. And I think it's still possible to do write_body(b""). The application knows that body is empty itself.
Do you have the case where this doesn't work?