diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-06-06 16:37:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 14:37:10 +0000 |
commit | 5aca8b9e5d6420c65ab3ecf516e9d8c8eaaee28f (patch) | |
tree | ac2b42b0e8735ddd2a3d1a0fb9885c24594ec0eb /test_util/src/lib.rs | |
parent | c76f9a022710be4abf2fa35f50716ff6df71cf17 (diff) |
fix(node/http): use fake socket and proper url handling (#19340)
Fixes https://github.com/denoland/deno/issues/19349
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r-- | test_util/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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..]); |