summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-04-19 17:07:44 +0200
committerGitHub <noreply@github.com>2021-04-19 17:07:44 +0200
commitfe59e7ae6034249c47eaf94f4258bb4467153f0d (patch)
tree2c9fbc10382dc151c2f5c6d0284b98faf19a2052 /cli/tests
parent4786e1d92dcbdcbe743c5e2be0878c3c4f68e781 (diff)
fix(rt/http): correct URL in Request (#10256)
This commit fixes the URL returned from `request.url` in the HTTP server to be fully qualified. This previously existed, but was removed and accidentially not readded during optimizations of the HTTP ops. Returning a non fully qualified URL from `Request#url` is not spec compliant.
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/http_test.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts
index 6383afd42..d661acbd1 100644
--- a/cli/tests/unit/http_test.ts
+++ b/cli/tests/unit/http_test.ts
@@ -12,6 +12,7 @@ unitTest({ perms: { net: true } }, async function httpServerBasic() {
for await (const conn of listener) {
const httpConn = Deno.serveHttp(conn);
for await (const { request, respondWith } of httpConn) {
+ assertEquals(new URL(request.url).href, "http://127.0.0.1:4501/");
assertEquals(await request.text(), "");
respondWith(new Response("Hello World", { headers: { "foo": "bar" } }));
}