From 3c27685e38eed696debede6b6278ebca7f905044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 31 Jul 2017 14:29:11 +0100 Subject: [PATCH] Update gst-plugin-http to reqwest 0.7 --- gst-plugin-http/Cargo.toml | 2 +- gst-plugin-http/src/httpsrc.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gst-plugin-http/Cargo.toml b/gst-plugin-http/Cargo.toml index 940197b6..277ad8b8 100644 --- a/gst-plugin-http/Cargo.toml +++ b/gst-plugin-http/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT/Apache-2.0" [dependencies] url = "1.1" gst-plugin = { path="../gst-plugin" } -reqwest = "0.6" +reqwest = "0.7" slog = "2.0" [lib] diff --git a/gst-plugin-http/src/httpsrc.rs b/gst-plugin-http/src/httpsrc.rs index 0955e0f7..9653f953 100644 --- a/gst-plugin-http/src/httpsrc.rs +++ b/gst-plugin-http/src/httpsrc.rs @@ -64,13 +64,15 @@ impl HttpSrc { start: u64, stop: Option) -> Result { - let mut req = self.client.get(uri.clone()); + let mut req = self.client.get(uri.clone()).unwrap(); match (start != 0, stop) { (false, None) => (), - (true, None) => req = req.header(Range::Bytes(vec![ByteRangeSpec::AllFrom(start)])), + (true, None) => { + req.header(Range::Bytes(vec![ByteRangeSpec::AllFrom(start)])); + } (_, Some(stop)) => { - req = req.header(Range::Bytes(vec![ByteRangeSpec::FromTo(start, stop - 1)])) + req.header(Range::Bytes(vec![ByteRangeSpec::FromTo(start, stop - 1)])); } }