From 9e875b2a2353eb4f3c6343a22e19c01276571cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 28 Jun 2021 00:19:40 +0200 Subject: fix(http): remove unwrap() in HTTP bindings (#11130) --- runtime/ops/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs index cd1ac9242..01658c802 100644 --- a/runtime/ops/http.rs +++ b/runtime/ops/http.rs @@ -222,7 +222,7 @@ async fn op_http_request_next( } else { Cow::Owned(conn_resource.addr.to_string()) }; - let path = req.uri().path_and_query().unwrap(); + let path = req.uri().path_and_query().map_or("/", |p| p.as_str()); format!("{}://{}{}", scheme, host, path) }; -- cgit v1.2.3