diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-18 06:44:20 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-18 06:44:20 +0000 |
commit | 90c1207c384a39567777bc58f2de38eb7df236d7 (patch) | |
tree | ce8564a6ab9ab2b1954cc0c91e6865c02e333423 /actionpack/test | |
parent | 4fd84aae90e940b1a33429c4c5f9872fec777b80 (diff) | |
download | rails-90c1207c384a39567777bc58f2de38eb7df236d7.tar.gz rails-90c1207c384a39567777bc58f2de38eb7df236d7.tar.bz2 rails-90c1207c384a39567777bc58f2de38eb7df236d7.zip |
Work around the two connection per host browser limit: use asset%d.myapp.com to distribute asset requests among asset[0123].myapp.com. Use a DNS wildcard or CNAMEs to map these hosts to your asset server. See http://www.die.net/musings/page_load_time/ for background.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index d80019c3f1..5393e30724 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -223,4 +223,11 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase ensure ActionController::Base.asset_host = "" end + + def test_should_wildcard_asset_host_between_zero_and_four + ActionController::Base.asset_host = 'http://a%d.example.com' + assert_match %r(http://a[0123].example.com/collaboration/hieraki/images/xml.png), image_path('xml.png') + ensure + ActionController::Base.asset_host = nil + end end |