diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index a6ea1e9649..21d8145ff1 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Speed up cookie use by decreasing string copying #2194 [skae] + * Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina] * Added easy assignment of fragment cache store through use of symbols for included stores (old way still works too) diff --git a/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb b/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb index 1c30f82b19..d73cb0355f 100644 --- a/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb +++ b/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb @@ -71,28 +71,28 @@ class CGI #:nodoc: # Convert the Cookie to its string representation. def to_s buf = "" - buf += @name + '=' + buf << @name << '=' if @value.kind_of?(String) - buf += CGI::escape(@value) + buf << CGI::escape(@value) else - buf += @value.collect{|v| CGI::escape(v) }.join("&") + buf << @value.collect{|v| CGI::escape(v) }.join("&") end if @domain - buf += '; domain=' + @domain + buf << '; domain=' << @domain end if @path - buf += '; path=' + @path + buf << '; path=' << @path end if @expires - buf += '; expires=' + CGI::rfc1123_date(@expires) + buf << '; expires=' << CGI::rfc1123_date(@expires) end if @secure == true - buf += '; secure' + buf << '; secure' end buf |