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) {