Ogeon / rustful

[OUTDATED] A light HTTP framework for Rust
https://docs.rs/rustful
Apache License 2.0
862 stars 52 forks source link

Responses with fixed size #37

Closed Ogeon closed 9 years ago

Ogeon commented 9 years ago

It is currently only possible to send chunked responses, but it should also be possible to send a response with a known size. This feature has to be available before the headers are send, so essentially in Response, and may be accomplished using either buffering or some sort of send_only style method. The difference between sending sized or chunked data should also be made clear. It may be a good idea to rename ResponseWriter to ChunkedResponse and into_writer to into_chunked, to reflect that.