Archived
1
0

Fix proxying non-ASCII (#6154)

This only affects the path proxy since `req.originalUrl` is in escaped format.
This commit is contained in:
smalllady
2023-04-26 03:41:33 +08:00
committed by GitHub
parent 2e17735795
commit 951d8ac45e
2 changed files with 12 additions and 1 deletions

View File

@ -187,6 +187,17 @@ describe("proxy", () => {
})
}).rejects.toThrow()
})
it("should proxy non-ASCII", async () => {
e.get("*", (req, res) => {
res.json("ほげ")
})
codeServer = await integration.setup(["--auth=none"], "")
const resp = await codeServer.fetch(proxyPath.replace("wsup", "ほげ"))
expect(resp.status).toBe(200)
const json = await resp.json()
expect(json).toBe("ほげ")
})
})
// NOTE@jsjoeio