Support PUT streams too
This commit is contained in:
parent
98f7f446f9
commit
7563c3ef46
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ use hyper::{
|
||||||
Get,
|
Get,
|
||||||
Head,
|
Head,
|
||||||
Post,
|
Post,
|
||||||
|
Put,
|
||||||
StatusCode,
|
StatusCode,
|
||||||
header::ContentType,
|
header::ContentType,
|
||||||
server::{Http, Request, Response, Service}
|
server::{Http, Request, Response, Service}
|
||||||
|
@ -96,7 +97,7 @@ impl Service for RelayServer {
|
||||||
.with_header(ContentType("video/webm".parse().unwrap()))
|
.with_header(ContentType("video/webm".parse().unwrap()))
|
||||||
.with_body(self.get_stream())
|
.with_body(self.get_stream())
|
||||||
},
|
},
|
||||||
(Post, "/live") => {
|
(Post, "/live") | (Put, "/live") => {
|
||||||
Response::new()
|
Response::new()
|
||||||
.with_body(self.post_stream(request_body))
|
.with_body(self.post_stream(request_body))
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue