aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-22 10:30:08 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-22 10:30:08 -0700
commite504cd261d850f01e4064b31a1ed543b5746ffd2 (patch)
tree142d2f62dc7158ae6c34dc3133cc4796b2fd2b42
parentd61eaed82b7a8f5254cfef20cbbdc968b8939d78 (diff)
parent4f0f5fc8b9bdc13f0aa37012443f6ea3c03a60e0 (diff)
downloadrails-e504cd261d850f01e4064b31a1ed543b5746ffd2.tar.gz
rails-e504cd261d850f01e4064b31a1ed543b5746ffd2.tar.bz2
rails-e504cd261d850f01e4064b31a1ed543b5746ffd2.zip
Merge pull request #12281 from kennyj/add_doc_about_12276
[ci skip] Add some comment about downcase url encoded string.
-rw-r--r--actionpack/lib/action_dispatch/journey/router/utils.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb
index 810f86db2f..1edf86cd88 100644
--- a/actionpack/lib/action_dispatch/journey/router/utils.rb
+++ b/actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -7,11 +7,13 @@ module ActionDispatch
# Normalizes URI path.
#
# Strips off trailing slash and ensures there is a leading slash.
+ # Also converts downcase url encoded string to uppercase.
#
# normalize_path("/foo") # => "/foo"
# normalize_path("/foo/") # => "/foo"
# normalize_path("foo") # => "/foo"
# normalize_path("") # => "/"
+ # normalize_path("/%ab") # => "/%AB"
def self.normalize_path(path)
path = "/#{path}"
path.squeeze!('/')