Skip to content

Url corruption when ":/" present #946

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

Closed
coderaiser opened this issue Jan 28, 2016 · 3 comments
Closed

Url corruption when ":/" present #946

coderaiser opened this issue Jan 28, 2016 · 3 comments

Comments

@coderaiser
Copy link
Contributor

Why are you replace lines: :/ to :// in urlJoin of common.js?

It corrupt work of join-io which uses such urls:

<script src="/join:/lib/client.js:/lib/util.js:/join/join.js"></script>
@coderaiser coderaiser changed the title Url corruption Url corruption when ":/" present Jan 28, 2016
@jcrugzz
Copy link
Contributor

jcrugzz commented Jan 28, 2016

@coderaiser its meant to handle cases where http://whatever.com turns into http:/whatever.com. This is a naive urlJoin since it fails on this case, it should be more specific to the post http. I would love a PR to fix this if you can turn this into a test case :)

@coderaiser
Copy link
Contributor Author

The thing is no http:// string is present on args. Here is example

args = [ '/',  '/iocmd/join:/modules/format-io/lib/format.js:lib/client/directory.js:/join/join.js' ] 
retSegs = [ '/iocmd/join://modules/format-io/lib/format.js:lib/client/directory.js://join/join.js' ]

@jcrugzz
Copy link
Contributor

jcrugzz commented Jan 28, 2016

@coderaiser Yes I understand. I was mentioning thats why it exists, Im not saying its correct. The code here needs to be smarter to handle the case you are mentioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants