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 0c11fad

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

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
@@ -195,8 +195,7 @@ function createRedirectDirectoryListener () {
195195

196196
// reformat the URL
197197
var loc = encodeUrl(url.format(originalUrl))
198-
var doc = createHtmlDocument('Redirecting', 'Redirecting to <a href="' + escapeHtml(loc) + '">' +
199-
escapeHtml(loc) + '</a>')
198+
var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc))
200199

201200
// send redirect response
202201
res.statusCode = 301

‎test/test.js

Copy file name to clipboardExpand all lines: test/test.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ describe('serveStatic()', function () {
483483
request(server)
484484
.get('/users')
485485
.expect('Location', '/users/')
486-
.expect(301, /<a href="\/users\/">/, done)
486+
.expect(301, /\/users\//, done)
487487
})
488488

489489
it('should redirect directories with query string', function (done) {
@@ -505,7 +505,7 @@ describe('serveStatic()', function () {
505505
.get('/snow')
506506
.expect('Location', '/snow%20%E2%98%83/')
507507
.expect('Content-Type', /html/)
508-
.expect(301, />Redirecting to <a href="\/snow%20%E2%98%83\/">\/snow%20%E2%98%83\/<\/a></, done)
508+
.expect(301, />Redirecting to \/snow%20%E2%98%83\/</, done)
509509
})
510510

511511
it('should respond with default Content-Security-Policy', function (done) {

0 commit comments

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