From 8dbb3a30dda03007031f5f1fd58077a4d28f555a Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Mon, 27 Mar 2023 14:05:11 +0200 Subject: [PATCH] When launching a file automatically, provides the file name to the URL so that the content-type guesser works for zip files --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 2e2ae4c712..1948b64871 100644 --- a/server.js +++ b/server.js @@ -110,7 +110,9 @@ if (argv.profile) { // Open on profile. profileServer.listen(0, host, () => { const profileFromUrl = `${profilerUrl}/from-url/${encodeURIComponent( - `http://${host}:${profileServer.address().port}/` + `http://${host}:${profileServer.address().port}/${encodeURIComponent( + path.basename(argv.profile) + )}` )}`; open(profileFromUrl, openOptions); });