Skip to content

Strip repeated slashes from URL path#39

Open
ilari-makimattila wants to merge 1 commit into
pottava:masterfrom
Auterion:strip-repeated-slashes
Open

Strip repeated slashes from URL path#39
ilari-makimattila wants to merge 1 commit into
pottava:masterfrom
Auterion:strip-repeated-slashes

Conversation

@ilari-makimattila

Copy link
Copy Markdown

This will replace the default behavior of redirecting to serving the resource directly.
For example for request GET /path//to/file the previous behavior was to respond with 301 Moved Permanently with Location: /path/to/file header.
The new behavior is to treat the path as /path/to/file and serve the file immediately.

There are some tools that create URLs by concatenating strings and end up having repeated slashes in the resulting URL. Some of these tools are also not following redirects and end up with an incorrect result. It is by far easier to have the server to support this arguably incorrect behavior than it is to fix these tools.

This will replace the default behaviour of redirecting to serving the
resource directly.
For example for request GET /path//to/file the previous behavior was to
send 301 Moved Permanently with Location: /path/to/file header.
The new behavior is to treat the path as /path/to/file and serve the
file immediately.
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.

1 participant