Skip to content

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

@GUI

Description

@GUI

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions