Open mridgway opened 1 year ago
Restify Version: master Node.js Version: 16.17.0
prePath middleware should reduce path /// to /.
///
/
prePath middleware reduces /// to `` (empty string).
Test case: https://github.com/restify/node-restify/compare/master...mridgway:node-restify:prePathEmptyString
This code will parse an empty string which returns null for pathname. The router will then assert the pathname as a string and throw.
pathname
Yes, if/when I have some time.
Restify Version: master Node.js Version: 16.17.0
Expected behaviour
prePath middleware should reduce path
///
to/
.Actual behaviour
prePath middleware reduces
///
to `` (empty string).Repro case
Test case: https://github.com/restify/node-restify/compare/master...mridgway:node-restify:prePathEmptyString
Cause
This code will parse an empty string which returns null for
pathname
. The router will then assert thepathname
as a string and throw.Are you willing and able to fix this?
Yes, if/when I have some time.