diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-20 17:03:48 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-20 17:03:48 -0600 |
commit | 28129174f0b3eeaf644a7f00a89a76869960d672 (patch) | |
tree | 669e22f60b5fcf20f8c7b22f107fc584c2cbbaaa /activesupport/test/caching_test.rb | |
parent | 6ae515d1bf1fe60527b010ffd35314470000e864 (diff) | |
parent | 2b5a8bc1868aedcd8dcb84c906792207282ae303 (diff) | |
download | rails-28129174f0b3eeaf644a7f00a89a76869960d672.tar.gz rails-28129174f0b3eeaf644a7f00a89a76869960d672.tar.bz2 rails-28129174f0b3eeaf644a7f00a89a76869960d672.zip |
Merge pull request #19889 from cedrics/long-uri-encoded-keys
FileStore: Long cache keys may result in too long paths due to encoding
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r-- | activesupport/test/caching_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index c235dee5e1..fb52613a23 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -762,6 +762,11 @@ class FileStoreTest < ActiveSupport::TestCase assert_equal 1, @cache.read("a"*10000) end + def test_long_uri_encoded_keys + @cache.write("%"*870, 1) + assert_equal 1, @cache.read("%"*870) + end + def test_key_transformation key = @cache.send(:key_file_path, "views/index?id=1") assert_equal "views/index?id=1", @cache.send(:file_path_key, key) |