Skip to content
Myr

Fix handling of invalid empty URLs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #2399

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 6614352 · Browse files · 3 files+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+18 added−0 removed

  • tests:+10 added−0 removed
  • other:+8 added−0 removed

3 files+18 added−0 removed

modified:lib/router/layer.js+7 added
modified:test/Router.js+10 added
41 unmodified lines
4243 router.handle({ url: '/test/route', method: 'GET' }, { end: done });44 });4546 it('should handle blank URL', function(done){47 var router = new Router();4849 router.use(function (req, res) {50 false.should.be.true;51 });5253 router.handle({ url: '', method: 'GET' }, {}, done);54 });5556 describe('.handle', function(){57 it('should dispatch', function(done){58 var router = new Router();59
414 unmodified lines
modified:History.md+1 added
2 unmodified lines
34 * Add support for `app.set('views', array)`5 - Views are looked up in sequence in array of directories6 * Fix `res.send(status)` to mention `res.sendStatus(status)`7 * Fix handling of invalid empty URLs8 * Use `content-disposition` module for `res.attachment`/`res.download`9 - Sends standards-compliant `Content-Disposition` header10 - Full Unicode support11 * Use `path.resolve` in view lookup
2424 unmodified lines