Closed duanefields closed 8 years ago
Wrapping line 47 in decodeURIComponent
fixes it - but I'm not familiar enough with the rest of the code to know if this is a fix, or just hacking one particular case and breaking everything else....
pathname: decodeURIComponent(compiledPath(_.extend({}, req.params, options.params))),
That seems like a reasonable solution. I will make that change and add a unit test with your use case. Risk seems low that this would have any detrimental impacts on the happy path. You are also welcome to make a pull request with the change and a corresponding unit test if you like. Either way thanks for raising the issue.
Never mind... this exact fix is already in 1.1.0 - I had a stale version of the package... I swear I'd checked that...
Given the request
And the mapping
Where the epiquery server var is
http://localhost:8080
The proxy code is escaping the slashes in the path
The problem seems to be in request-options.js, line 47 - compiledPath regexp is escaping the path
I'm guessing the fault is in
path-to-regexp
, but that's as far as I've gotten.