You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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
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
The text was updated successfully, but these errors were encountered: