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

Strip repeated slashes from URL path #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilari-makimattila
Copy link

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