Merge branch 'master' of ssh://git.vbrandl.net:222/vbrandl/hoc

This commit is contained in:
Valentin Brandl 2019-04-17 20:45:06 +02:00
commit 539b61e856
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -176,7 +176,9 @@ fn index() -> HttpResponse {
let (tx, rx_body) = mpsc::unbounded(); let (tx, rx_body) = mpsc::unbounded();
let _ = tx.unbounded_send(Bytes::from(INDEX.as_bytes())); let _ = tx.unbounded_send(Bytes::from(INDEX.as_bytes()));
HttpResponse::Ok().streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request"))) HttpResponse::Ok()
.content_type("text/html")
.streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request")))
} }
fn main() -> std::io::Result<()> { fn main() -> std::io::Result<()> {