• A
    Try to escape each part of a path redirect route correctly · d2e1caaa
    Andrew White 提交于
    A path redirect may contain any and all parts of a url which have different
    escaping rules for each part. This commit tries to escape each part correctly
    by splitting the string into three chunks - path (which may also include a host),
    query and fragment; then it applies the correct escape pattern to each part.
    
    Whilst using `URI.parse` would be better, unfortunately the possible presence
    of %{name} parameters in the path redirect string prevents us from using it so
    we have to use a regular expression instead.
    
    Fixes #13110.
    d2e1caaa
redirection.rb 6.1 KB