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

Squeeze multiple slashes in URLs #62

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Commits on Sep 7, 2024

  1. Squeeze multiple slashes in URLs

    Ruby 2.5 has removed the normalization of multiple slashes in URLs, so
    you can get 301 redirect errors if you run for example
    `Model.get('/batch/id')`.
    
    ```
    2.4 > URI.parse("http://example.org").merge('people//batch///id')
     => #<URI::HTTP http://example.org/people/batch/id> 
                                             ^     ^
    ```
    
    ```
    2.5 > URI.parse("http://example.org").merge('people//batch///id')
     => #<URI::HTTP http://example.org/people//batch///id> 
                                             ^^     ^^^
    ```
    
    In Hawk's use case, it should be safe to assume that paths should be
    squeezed, but since this can be considered a breaking change, this
    commit also bumps the major version number
    
    Ref: https://bugs.ruby-lang.org/issues/8352
    tagliala committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    bd07aa2 View commit details
    Browse the repository at this point in the history