From 2f7967f613df3d54eb9766cc3b8ca2c545d4fab2 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Tue, 10 Sep 2024 08:53:16 -0700 Subject: [PATCH] Remove encodeurl as a dep --- index.js | 3 +-- package.json | 1 - test/test.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index ec34be9..4db330a 100644 --- a/index.js +++ b/index.js @@ -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') @@ -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) diff --git a/package.json b/package.json index 13c7296..f31e0ff 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/test.js b/test/test.js index 3fb931f..0dc8d58 100644 --- a/test/test.js +++ b/test/test.js @@ -243,7 +243,7 @@ var topDescribe = function (type, createServer) { it('should escape method and pathname characters', function (done) { (type === 'http2' ? rawrequestHTTP2 : rawrequest)(createServer()) .get('/') - .expect(404, /
Cannot GET \/%3Cla'me%3E<\/pre>/, done)
+        .expect(404, /
Cannot GET \/<la'me><\/pre>/, done)
     })
 
     it('should fallback to generic pathname without URL', function (done) {