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

Drop extra slashes #866

Merged
merged 2 commits into from
Feb 20, 2023
Merged

Drop extra slashes #866

merged 2 commits into from
Feb 20, 2023

Conversation

cuihtlauac
Copy link
Collaborator

@cuihtlauac cuihtlauac commented Jan 27, 2023

Handle the request unchanged if the target seems canonical, otherwise:

  • Turns repeated slashes into a single one
  • Drop the last slash
  • Redirect to the resulting target

Issue: #820

Note: Is Dream.split_target bugged? When passed a string beginning with exactly two slashes, split_target drops everything before the third slash. See: aantron/dream#248 As a workaround; three slashes are prepended to all targets

Handle the request unchanged if the target seems
canonical, otherwise:

  * Turns repeated slashes into a single one
  * Drop the last slash
  * Redirect to the resulting target

Note: Dream.split_targer bugged?
When passed a string beginning with exactly two slashes,
split_target drops everything before the first slash.
See: aantron/dream#248
As a work around, three slashes are preprended to all targets
@cuihtlauac
Copy link
Collaborator Author

Dream issue may be upstream: mirage/ocaml-uri#167

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