Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ae4f298

Browse filesBrowse files
UlisesGasconctcpip
andcommitted
Merge commit from fork
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com>
1 parent b69cbb3 commit ae4f298
Copy full SHA for ae4f298

File tree

2 files changed

+3
-4
lines changed
Filter options

2 files changed

+3
-4
lines changed

‎index.js

Copy file name to clipboardExpand all lines: index.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,7 @@ SendStream.prototype.redirect = function redirect (path) {
482482
}
483483

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

488487
// redirect
489488
res.statusCode = 301

‎test/send.js

Copy file name to clipboardExpand all lines: test/send.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ describe('send(file).pipe(res)', function () {
358358
.get('/pets')
359359
.expect('Location', '/pets/')
360360
.expect('Content-Type', /html/)
361-
.expect(301, />Redirecting to <a href="\/pets\/">\/pets\/<\/a></, done)
361+
.expect(301, />Redirecting to \/pets\/</, done)
362362
})
363363

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.