Skip to content

Commit 4900ad4

Browse files
committed
Merge pull request rails#12281 from kennyj/add_doc_about_12276
[ci skip] Add some comment about downcase url encoded string.
1 parent fab8c3d commit 4900ad4

File tree

1 file changed

+2
-0
lines changed
  • actionpack/lib/action_dispatch/journey/router

1 file changed

+2
-0
lines changed

actionpack/lib/action_dispatch/journey/router/utils.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ class Utils # :nodoc:
77
# Normalizes URI path.
88
#
99
# Strips off trailing slash and ensures there is a leading slash.
10+
# Also converts downcase url encoded string to uppercase.
1011
#
1112
# normalize_path("/foo") # => "/foo"
1213
# normalize_path("/foo/") # => "/foo"
1314
# normalize_path("foo") # => "/foo"
1415
# normalize_path("") # => "/"
16+
# normalize_path("/%ab") # => "/%AB"
1517
def self.normalize_path(path)
1618
path = "/#{path}"
1719
path.squeeze!('/')

0 commit comments

Comments
 (0)