We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fab8c3d commit 4900ad4Copy full SHA for 4900ad4
actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -7,11 +7,13 @@ class Utils # :nodoc:
7
# Normalizes URI path.
8
#
9
# Strips off trailing slash and ensures there is a leading slash.
10
+ # Also converts downcase url encoded string to uppercase.
11
12
# normalize_path("/foo") # => "/foo"
13
# normalize_path("/foo/") # => "/foo"
14
# normalize_path("foo") # => "/foo"
15
# normalize_path("") # => "/"
16
+ # normalize_path("/%ab") # => "/%AB"
17
def self.normalize_path(path)
18
path = "/#{path}"
19
path.squeeze!('/')
0 commit comments