Skip to content

Instantly share code, notes, and snippets.

@mykwillis
Created July 28, 2015 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykwillis/cf0a955d1a273257e798 to your computer and use it in GitHub Desktop.
Save mykwillis/cf0a955d1a273257e798 to your computer and use it in GitHub Desktop.
/**
* 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();
});
});
@mykwillis
Copy link
Author

This was confirmed as a regression in express 4.13.1, and fixed for 4.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment