Update api.rs

This commit is contained in:
Gav Wood 2016-04-14 22:16:21 -07:00
parent f81914351d
commit 77a535865b

View File

@ -73,6 +73,7 @@ impl server::Handler<HttpStream> for RestApiHandler {
res.headers_mut().set(header::ContentType("application/json".parse().unwrap()));
Next::write()
}
fn on_response_writable(&mut self, encoder: &mut Encoder<HttpStream>) -> Next {
let bytes = self.pages.as_bytes();
if self.write_pos == bytes.len() {