Support PUT streams too

This commit is contained in:
Tangent 128 2018-04-11 01:43:40 -04:00
parent 98f7f446f9
commit 7563c3ef46
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ use hyper::{
Get,
Head,
Post,
Put,
StatusCode,
header::ContentType,
server::{Http, Request, Response, Service}
@ -96,7 +97,7 @@ impl Service for RelayServer {
.with_header(ContentType("video/webm".parse().unwrap()))
.with_body(self.get_stream())
},
(Post, "/live") => {
(Post, "/live") | (Put, "/live") => {
Response::new()
.with_body(self.post_stream(request_body))
},