Skip to content

Release: 0.19.0 #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Merge commit from fork
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com>
  • Loading branch information
UlisesGascon and ctcpip committed Sep 10, 2024
commit 50fbfbf6e55c941b9e52b6e839052ee534bdbef5
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,7 @@ SendStream.prototype.redirect = function redirect (path) {
}

var loc = encodeUrl(collapseLeadingSlashes(this.path + '/'))
var doc = createHtmlDocument('Redirecting', 'Redirecting to <a href="' + escapeHtml(loc) + '">' +
escapeHtml(loc) + '</a>')
var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc))

// redirect
res.statusCode = 301
Expand Down
4 changes: 2 additions & 2 deletions test/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ describe('send(file).pipe(res)', function () {
.get('/pets')
.expect('Location', '/pets/')
.expect('Content-Type', /html/)
.expect(301, />Redirecting to <a href="\/pets\/">\/pets\/<\/a></, done)
.expect(301, />Redirecting to \/pets\/</, done)
})

it('should respond with default Content-Security-Policy', function (done) {
Expand Down Expand Up @@ -386,7 +386,7 @@ describe('send(file).pipe(res)', function () {
.get('/snow')
.expect('Location', '/snow%20%E2%98%83/')
.expect('Content-Type', /html/)
.expect(301, />Redirecting to <a href="\/snow%20%E2%98%83\/">\/snow%20%E2%98%83\/<\/a></, done)
.expect(301, />Redirecting to \/snow%20%E2%98%83\/</, done)
})
})

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy