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

Request URLs with backslashes in them were being transformed into forward slashes #199

Closed
GUI opened this issue Mar 9, 2015 · 1 comment

Comments

@GUI
Copy link
Member

GUI commented Mar 9, 2015

While investigating #198, I encountered a strange bit of behavior in our proxy: If a backslash was contained in the URL, it was getting turned into a forward slash before the API backend got the request. For example, if I requested https://api.data.gov/example?something=\test, the underlying backend would actually receive /example?something=/test. While I think the use-case for backslashes in a URL is probably somewhat rare (and nobody's actually complained about this), this would be good for us to fix so our proxy isn't doing unexpected things to the request (since I can envision this eventually biting someone).

It turns out this is a bug in Node.js's URL library, so if any URL manipulation was involved at our Node proxy layer, it was flipping the slashes around. See: nodejs/node-v0.x-archive#8458 and nodejs/node-v0.x-archive#8459

@GUI GUI self-assigned this Mar 9, 2015
@GUI GUI added this to the Sprint 16 (2/23-3/6) milestone Mar 9, 2015
@GUI
Copy link
Member Author

GUI commented Mar 9, 2015

This is fixed in Node v0.12 (which was just recently released), but since we're still on Node v0.10, I've patched this with a workaround on our end and added tests around this behavior: NREL/api-umbrella-gatekeeper@f338714

@GUI GUI closed this as completed Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant