mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-14 21:21:44 +03:00
fix(examples): properly load request path in streaming example
This commit is contained in:
parent
f37354e675
commit
5666c0bce8
@ -47,6 +47,9 @@ fn main() {
|
|||||||
let path = request.uri().replace("stream://localhost/", "");
|
let path = request.uri().replace("stream://localhost/", "");
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
let path = request.uri().replace("stream://", "");
|
let path = request.uri().replace("stream://", "");
|
||||||
|
let path = percent_encoding::percent_decode(path.as_bytes())
|
||||||
|
.decode_utf8_lossy()
|
||||||
|
.to_string();
|
||||||
|
|
||||||
if path != "example/test_video.mp4" {
|
if path != "example/test_video.mp4" {
|
||||||
// return error 404 if it's not out video
|
// return error 404 if it's not out video
|
||||||
|
Loading…
Reference in New Issue
Block a user