Skip to content

Commit

Permalink
Remove encodeurl as a dep
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Sep 10, 2024
1 parent 42a0a2a commit 2f7967f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/

var debug = require('debug')('finalhandler')
var encodeUrl = require('encodeurl')
var escapeHtml = require('escape-html')
var onFinished = require('on-finished')
var parseUrl = require('parseurl')
Expand Down Expand Up @@ -112,7 +111,7 @@ function finalhandler (req, res, options) {
} else {
// not found
status = 404
msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req))
msg = 'Cannot ' + req.method + ' ' + getResourceName(req)
}

debug('default %s', status)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"repository": "pillarjs/finalhandler",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ var topDescribe = function (type, createServer) {
it('should escape method and pathname characters', function (done) {
(type === 'http2' ? rawrequestHTTP2 : rawrequest)(createServer())
.get('/<la\'me>')
.expect(404, /<pre>Cannot GET \/%3Cla&#39;me%3E<\/pre>/, done)
.expect(404, /<pre>Cannot GET \/&lt;la&#39;me&gt;<\/pre>/, done)
})

it('should fallback to generic pathname without URL', function (done) {
Expand Down

0 comments on commit 2f7967f

Please sign in to comment.