mockserver
mockserver copied to clipboard
Wrong arguments passed to the `evalHandler`
Passing the context to evalHandler (contrary to its signature) makes the request parameter unreachable in the evaluated code.
https://github.com/namshi/mockserver/blob/39b3e8df58659214a2ecd48aa1d07983bdbdb2c4/handlers/evalHandler.js#L1 https://github.com/namshi/mockserver/blob/39b3e8df58659214a2ecd48aa1d07983bdbdb2c4/mockserver.js#L84 https://github.com/namshi/mockserver/blob/39b3e8df58659214a2ecd48aa1d07983bdbdb2c4/mockserver.js#L110
So the following doesn't work, since request has here the value of context instead:
#eval request.body;