From 5aca8b9e5d6420c65ab3ecf516e9d8c8eaaee28f Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Tue, 6 Jun 2023 16:37:10 +0200 Subject: fix(node/http): use fake socket and proper url handling (#19340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/denoland/deno/issues/19349 --------- Co-authored-by: Bartek IwaƄczuk --- test_util/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test_util/src') diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 4b6490587..f88092ad9 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -1085,6 +1085,11 @@ async fn main_server( )); Ok(res) } + (_, "/search_params") => { + let query = req.uri().query().map(|s| s.to_string()); + let res = Response::new(Body::from(query.unwrap_or_default())); + Ok(res) + } _ => { let mut file_path = testdata_path(); file_path.push(&req.uri().path()[1..]); -- cgit v1.2.3