Skip to content
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

Fix to handle app name specifications with slashes. This is the CLI ... #471

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

BretJohnson
Copy link
Member

change to match the corresponding server change deployed
a couple days back.

Here are details of the issue:
// IIS and Azure web apps have this annoying behavior where %2F (URL encoded slashes) in the URL are URL decoded
// BEFORE the requests reach node. That essentially means there's no good way to encode a "/" in the app name--
// URL encodeing will work when running locally but when running on Azure it gets decoded before express sees it,
// so app names with slashes don't get routed properly. See tjanczuk/iisnode#343 (or other sites
// that complain about the same) for some more info. I explored some IIS config based workarounds, but the previous
// link seems to say they won't work, so I eventually gave up on that.
// Anyway, to workaround this issue, we now allow the client to encode / characters as ~~ (two tildes, URL encoded).
// The CLI now converts / to ~~ if / appears in an app name, before passing that as part of the URL. This code below
// does the encoding. It's hack, but seems like the least bad option here.
// Eventually, this service will go away & we'll all be on Max's new service. That's hosted in docker, no more IIS,
// so this issue should go away then.

change to match the corresponding server change deployed
a couple days back.

Here are details of the issue:
// IIS and Azure web apps have this annoying behavior where %2F (URL encoded slashes) in the URL are URL decoded
// BEFORE the requests reach node. That essentially means there's no good way to encode a "/" in the app name--
// URL encodeing will work when running locally but when running on Azure it gets decoded before express sees it,
// so app names with slashes don't get routed properly. See tjanczuk/iisnode#343 (or other sites
// that complain about the same) for some more info. I explored some IIS config based workarounds, but the previous
// link seems to say they won't work, so I eventually gave up on that.
// Anyway, to workaround this issue, we now allow the client to encode / characters as ~~ (two tildes, URL encoded).
// The CLI now converts / to ~~ if / appears in an app name, before passing that as part of the URL. This code below
// does the encoding. It's hack, but seems like the least bad option here.
// Eventually, this service will go away & we'll all be on Max's new service. That's hosted in docker, no more IIS,
// so this issue should go away then.
@BretJohnson BretJohnson merged commit eae70b7 into master Jun 12, 2017
@BretJohnson BretJohnson deleted the fix-slash-character-encoding branch June 12, 2017 02:21
@BretJohnson BretJohnson changed the title Fix to handle app name specifications with slashes. The is the CLI ... Fix to handle app name specifications with slashes. This is the CLI ... Jun 12, 2017
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

Successfully merging this pull request may close these issues.

2 participants