-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle null uri.pathname bug #142
Conversation
@@ -76,7 +76,8 @@ tilelive.load = function(uri, callback) { | |||
|
|||
if (typeof uri === 'string') { | |||
uri = url.parse(uri, true); | |||
uri.pathname = qs.unescape(uri.pathname); | |||
if (uri.pathname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use brackets for multiline if statements.
9d54027
to
676b098
Compare
@tmcw thx, didn't see your comment, fixed. |
Sometimes modules do not require a full path, and can use shorter version, e.g. overzoom://?source=blah which results in the null pathname, which fails in the unescape.
@tmcw is there anything preventing this PR? thx! |
Looks like this keeps failing one test on node 0.12.x. |
@rclark I just installed node v0.12.13 using nvm, did npm install and npm test, and it all passes on my machine. Could this be a bug in travis? |
Thanks for investigating -- I reran the travis test and it passed, so some other issue. My only other request would be a test that asserts a URI without a path parses successfully, to protect against any future regression. |
@rclark added. Also, in the process i discovered that this bug only happens for node 0.10. In node 0.12, the patch is no longer relevant |
Sometimes modules do not require a full path,
and can use shorter version, e.g. overzoom://?source=blah
which results in the null pathname, which fails in the unescape.