When using Express' URL parameter functionality, it seems that parameters are automatically decoded. That is, percent-encoded entities are resolved to their normal form. %20 is replaced with a space.
However, a plus + is not replaced with a space. This is presumably because Express is using decodeURIComponent() internally, which also does not replace plus + with a space. Simple example code:
app.get('/:sourceFile', function (req, res, next) {
console.log(req.params.sourceFile);
});
If you request /test%20test, then you get test test on the console. If you request /test+test, then you get test+test on the console.
Is there a way to change this mode of operation in Express 4? Is this a bug?