-
Notifications
You must be signed in to change notification settings - Fork 104
Incorrect pathname in version 1.5.0 #199
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Looking into this as we speak, that seems super wierd 😞 |
It's interesting that when I test:
it passes the assertion just fine and outputs:
Which is what we would expect. |
Actually I put a wrong url. The url from which I try is |
Ah, now it's indeed breaking. That so weird :/ |
The problem is caused by the new |
That's what I thought as well, but unfortunately that regexp change is necessary to catch all the weird slash combo's that people can use within URL's. I thought I fixed all edge-cases but somehow this one slipped through. Even our massive resolve test didn't get triggered by this. |
Just jumping in here for a minute, as I see it's an active conversation right now. e.g. |
Cant reproduce that, please open a new ticket with steps to reproduce |
diff --git a/index.js b/index.js
index e54575a..b35a9df 100644
--- a/index.js
+++ b/index.js
@@ -123,7 +123,7 @@ function extractProtocol(address) {
return {
protocol: protocol,
slashes: slashes,
- rest: match[3]
+ rest: match[2] && match[2].length === 1 ? '/' + match[3] : match[3]
};
} This seems to fix the issue but I'm not sure if it has side effects and we also need a regression test. |
Yes, will do. Thanks. Please see here: Issue #200 |
I landed on a similar fix:
But it's currently breaking 2 tests. |
Fixed in 1.5.1, thanks for reporting <3 |
Uh oh!
There was an error while loading. Please reload this page.
Good morning,
Since the last update the pathname is not correctly parsed.
If I run this example from http://localhost:3000/PROD/trends:
Version 1.5.0 of the library returns this:
While version 1.4.7 was returning this:
AFAIK, the pathname of the page you are in shouldn't be taken into account to parse the URL.
This bug is breaking sockjs-client library.
The text was updated successfully, but these errors were encountered: