From 50fbfbf6e55c941b9e52b6e839052ee534bdbef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Tue, 10 Sep 2024 02:13:51 +0200 Subject: [PATCH 1/2] Merge commit from fork Co-authored-by: Chris de Almeida --- index.js | 3 +-- test/send.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 89afd7e..768f8ca 100644 --- a/index.js +++ b/index.js @@ -482,8 +482,7 @@ SendStream.prototype.redirect = function redirect (path) { } var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + - escapeHtml(loc) + '') + var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) // redirect res.statusCode = 301 diff --git a/test/send.js b/test/send.js index d419f8f..7fa9dd7 100644 --- a/test/send.js +++ b/test/send.js @@ -358,7 +358,7 @@ describe('send(file).pipe(res)', function () { .get('/pets') .expect('Location', '/pets/') .expect('Content-Type', /html/) - .expect(301, />Redirecting to \/pets\/<\/a>Redirecting to \/pets\/Redirecting to \/snow%20%E2%98%83\/<\/a>Redirecting to \/snow%20%E2%98%83\/ Date: Tue, 10 Sep 2024 02:22:28 +0200 Subject: [PATCH 2/2] 0.19.0 --- HISTORY.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index a739774..0dd29d0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +0.19.0 / 2024-09-10 +=================== + +* Remove link renderization in html while redirecting + 0.18.0 / 2022-03-23 =================== diff --git a/package.json b/package.json index 7f269d5..a3233e0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "send", "description": "Better streaming static file server with Range and conditional-GET support", - "version": "0.18.0", + "version": "0.19.0", "author": "TJ Holowaychuk ", "contributors": [ "Douglas Christopher Wilson ",