Created
July 28, 2015 02:05
-
-
Save mykwillis/cf0a955d1a273257e798 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple Expressjs application demonstrating difference in routing behavior | |
* between version 4.12.4 and 4.13.1. | |
*/ | |
var express = require('express'); | |
var request = require('request'); | |
var http_server = express() | |
.get('/:foo\\(:bar?\\)', function(req, res, next) { | |
res.end(JSON.stringify({ 'foo': req.params.foo, 'bar': req.params.bar })); | |
}).listen(8080, function() { | |
request('http://localhost:8080/hello(world)', function(err, res, body) { | |
// 4.12.4: {"foo":"hello","bar":"world"} | |
// 4.13.1: {"foo":"hello"} | |
console.log(body); | |
process.exit(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was confirmed as a regression in express 4.13.1, and fixed for 4.13.2