Permalink
Browse files

Merge commit 'mainstream/master'

  • Loading branch information...
2 parents 8ba1fc1 + 7c0e008 commit d8f1ee4b41352b870f617b01099b2877f754d32c @lifo lifo committed Feb 19, 2009
Showing with 6,598 additions and 1,394 deletions.
  1. +1 −0 actionmailer/test/abstract_unit.rb
  2. +1 −1 actionmailer/test/mail_service_test.rb
  3. +2 −0 actionpack/CHANGELOG
  4. +1 −4 actionpack/lib/action_controller.rb
  5. +1 −0 actionpack/lib/action_controller/base.rb
  6. +1 −0 actionpack/lib/action_controller/caching.rb
  7. +5 −0 actionpack/lib/action_controller/cgi_process.rb
  8. +1 −1 actionpack/lib/action_controller/cookies.rb
  9. +5 −9 actionpack/lib/action_controller/dispatcher.rb
  10. +1 −1 actionpack/lib/action_controller/http_authentication.rb
  11. +1 −1 actionpack/lib/action_controller/integration.rb
  12. +0 −3 actionpack/lib/action_controller/rack_ext.rb
  13. +0 −21 actionpack/lib/action_controller/rack_ext/lock.rb
  14. +0 −22 actionpack/lib/action_controller/rack_ext/multipart.rb
  15. +0 −17 actionpack/lib/action_controller/rack_ext/parse_query.rb
  16. +27 −4 actionpack/lib/action_controller/request.rb
  17. +1 −1 actionpack/lib/action_controller/rescue.rb
  18. +9 −32 actionpack/lib/action_controller/response.rb
  19. +37 −24 actionpack/lib/action_controller/session/abstract_store.rb
  20. +5 −8 actionpack/lib/action_controller/session/cookie_store.rb
  21. +1 −1 actionpack/lib/action_controller/streaming.rb
  22. +6 −2 actionpack/lib/action_controller/test_process.rb
  23. +0 −155 actionpack/lib/action_controller/url_encoded_pair_parser.rb
  24. +87 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack.rb
  25. +22 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/adapter/camping.rb
  26. +37 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/handler.rb
  27. +37 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/request.rb
  28. +58 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/basic.rb
  29. +124 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/md5.rb
  30. +51 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/nonce.rb
  31. +55 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/params.rb
  32. +40 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/request.rb
  33. +480 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/openid.rb
  34. +67 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/builder.rb
  35. +36 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/cascade.rb
  36. +61 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/commonlogger.rb
  37. +45 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/conditionalget.rb
  38. +27 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/content_length.rb
  39. +85 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/deflater.rb
  40. +151 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/directory.rb
  41. +88 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/file.rb
  42. +48 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler.rb
  43. +57 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/cgi.rb
  44. +8 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/evented_mongrel.rb
  45. +86 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/fastcgi.rb
  46. +52 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/lsws.rb
  47. +82 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb
  48. +57 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/scgi.rb
  49. +8 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/swiftiplied_mongrel.rb
  50. +15 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/thin.rb
  51. +61 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb
  52. +19 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb
  53. +476 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb
  54. +65 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/lobster.rb
  55. +16 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb
  56. +27 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb
  57. +204 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/mime.rb
  58. +160 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/mock.rb
  59. +57 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/recursive.rb
  60. +64 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/reloader.rb
  61. +241 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/request.rb
  62. +177 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/response.rb
  63. +142 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/session/abstract/id.rb
  64. +91 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/session/cookie.rb
  65. +109 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/session/memcache.rb
  66. +100 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/session/pool.rb
  67. +349 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/showexceptions.rb
  68. +106 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/showstatus.rb
  69. +38 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/static.rb
  70. +51 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb
  71. +379 −0 actionpack/lib/action_controller/vendor/rack-1.0/rack/utils.rb
  72. +1 −1 actionpack/lib/action_controller/verification.rb
  73. +1 −0 actionpack/lib/action_view.rb
  74. +11 −0 actionpack/lib/action_view/base.rb
  75. +1 −1 actionpack/lib/action_view/helpers/date_helper.rb
  76. +21 −9 actionpack/lib/action_view/helpers/form_helper.rb
  77. +92 −15 actionpack/lib/action_view/helpers/form_options_helper.rb
  78. +1 −1 actionpack/lib/action_view/helpers/text_helper.rb
  79. +19 −1 actionpack/lib/action_view/helpers/translation_helper.rb
  80. +13 −5 actionpack/lib/action_view/paths.rb
  81. +120 −0 actionpack/lib/action_view/reloadable_template.rb
  82. +4 −1 actionpack/lib/action_view/renderable.rb
  83. +47 −56 actionpack/lib/action_view/template.rb
  84. +5 −0 actionpack/test/abstract_unit.rb
  85. +2 −1 actionpack/test/active_record_unit.rb
  86. +1 −1 actionpack/test/controller/cookie_test.rb
  87. +10 −1 actionpack/test/controller/http_digest_authentication_test.rb
  88. +1 −1 actionpack/test/controller/integration_test.rb
  89. +17 −3 actionpack/test/controller/rack_test.rb
  90. +0 −7 actionpack/test/controller/rescue_test.rb
  91. +26 −6 actionpack/test/controller/session/cookie_store_test.rb
  92. +18 −1 actionpack/test/controller/session/mem_cache_store_test.rb
  93. +1 −1 actionpack/test/controller/session/test_session_test.rb
  94. +15 −11 actionpack/test/controller/view_paths_test.rb
  95. +1 −0 actionpack/test/fixtures/test/hello_world.erb~
  96. +1 −0 actionpack/test/fixtures/test/hello_world.pt-BR.html.erb
  97. +1 −0 actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.da.html.erb
  98. +2 −0 actionpack/test/fixtures/test/utf8.html.erb
  99. +80 −40 actionpack/test/template/compiled_templates_test.rb
  100. +14 −14 actionpack/test/template/date_helper_test.rb
  101. +64 −46 actionpack/test/template/form_helper_test.rb
  102. +103 −78 actionpack/test/template/form_options_helper_test.rb
  103. +57 −12 actionpack/test/template/render_test.rb
  104. +6 −0 actionpack/test/template/translation_helper_test.rb
  105. +3 −1 activerecord/Rakefile
  106. +5 −1 activerecord/lib/active_record/migration.rb
  107. +146 −100 activerecord/lib/active_record/nested_attributes.rb
  108. +212 −76 activerecord/test/cases/nested_attributes_test.rb
  109. +1 −1 activerecord/test/models/pirate.rb
  110. +2 −2 activerecord/test/models/ship.rb
  111. +2 −0 activeresource/Rakefile
  112. +6 −6 activeresource/lib/active_resource/base.rb
  113. +24 −42 activeresource/lib/active_resource/http_mock.rb
  114. +1 −1 activeresource/lib/active_resource/validations.rb
  115. +2 −3 activeresource/test/setter_trap.rb
  116. +9 −0 activesupport/CHANGELOG
  117. +2 −0 activesupport/lib/active_support/core_ext/array.rb
  118. +24 −0 activesupport/lib/active_support/core_ext/array/wrapper.rb
  119. +1 −1 activesupport/lib/active_support/core_ext/string/inflections.rb
  120. +1 −1 activesupport/lib/active_support/core_ext/time/conversions.rb
  121. +1 −0 activesupport/lib/active_support/core_ext/try.rb
  122. +1 −0 activesupport/lib/active_support/inflections.rb
  123. +3 −2 activesupport/lib/active_support/json/decoding.rb
  124. +9 −10 activesupport/lib/active_support/json/encoders/hash.rb
  125. +11 −7 activesupport/lib/active_support/testing/assertions.rb
  126. +0 −6 activesupport/lib/active_support/testing/core_ext/test.rb
  127. +0 −72 activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
  128. +1 −1 activesupport/lib/active_support/testing/setup_and_teardown.rb
  129. +3 −2 activesupport/lib/active_support/time_with_zone.rb
  130. +1 −1 activesupport/lib/active_support/vendor.rb
  131. +34 −0 activesupport/test/core_ext/array_ext_test.rb
  132. +5 −7 activesupport/test/core_ext/date_ext_test.rb
  133. +11 −13 activesupport/test/core_ext/duration_test.rb
  134. +4 −0 activesupport/test/core_ext/time_ext_test.rb
  135. +165 −251 activesupport/test/core_ext/time_with_zone_test.rb
  136. +2 −1 activesupport/test/inflector_test_cases.rb
  137. +3 −0 activesupport/test/json/decoding_test.rb
  138. +5 −2 activesupport/test/test_test.rb
  139. +34 −58 activesupport/test/time_zone_test.rb
  140. +1 −0 railties/environments/production.rb
  141. +1 −0 railties/environments/test.rb
  142. +0 −3 railties/html/500.html
  143. +0 −1 railties/lib/console_app.rb
  144. +12 −10 railties/lib/fcgi_handler.rb
  145. +3 −6 railties/lib/initializer.rb
  146. +1 −1 railties/lib/rails/plugin/loader.rb
  147. +8 −2 railties/lib/rails_generator/generators/applications/app/template_runner.rb
  148. +4 −4 railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
  149. +8 −0 railties/test/abstract_unit.rb
  150. +0 −40 railties/test/error_page_test.rb
  151. +34 −35 railties/test/fcgi_dispatcher_test.rb
  152. +13 −3 railties/test/generators/rails_template_runner_test.rb
  153. +20 −0 railties/test/initializer_test.rb
  154. +1 −1 railties/test/plugin_loader_test.rb
@@ -19,6 +19,7 @@
$:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers"
+ActionView::Base.cache_template_loading = true
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
ActionMailer::Base.template_root = FIXTURE_LOAD_PATH
@@ -975,7 +975,7 @@ def test_starttls_is_not_enabled
class InheritableTemplateRootTest < Test::Unit::TestCase
def test_attr
- expected = "#{File.dirname(__FILE__)}/fixtures/path.with.dots"
+ expected = ("#{File.dirname(__FILE__)}/fixtures/path.with.dots").sub(/\.\//, '')
assert_equal expected, FunkyPathMailer.template_root.to_s
sub = Class.new(FunkyPathMailer)
View
@@ -1,5 +1,7 @@
*Edge*
+* Added partial scoping to TranslationHelper#translate, so if you call translate(".foo") from the people/index.html.erb template, you'll actually be calling I18n.translate("people.index.foo") [DHH]
+
* Fix a syntax error in current_page?() that was prevent matches against URL's with multiple query parameters #1385, #1868 [chris finne/Andrew White]
* Added localized rescue template when I18n.locale is set (ex: public/404.da.html) #1835 [José Valim]
@@ -31,9 +31,7 @@
end
end
-gem 'rack', '>= 0.9.0'
-require 'rack'
-require 'action_controller/rack_ext'
+require 'action_controller/vendor/rack-1.0/rack'
module ActionController
# TODO: Review explicit to see if they will automatically be handled by
@@ -77,7 +75,6 @@ def self.load_all!
autoload :UploadedFile, 'action_controller/uploaded_file'
autoload :UploadedStringIO, 'action_controller/uploaded_file'
autoload :UploadedTempfile, 'action_controller/uploaded_file'
- autoload :UrlEncodedPairParser, 'action_controller/url_encoded_pair_parser'
autoload :UrlRewriter, 'action_controller/url_rewriter'
autoload :UrlWriter, 'action_controller/url_rewriter'
autoload :Verification, 'action_controller/verification'
@@ -913,6 +913,7 @@ def render(options = nil, extra_options = {}, &block) #:doc:
layout = pick_layout(options)
response.layout = layout.path_without_format_and_extension if layout
logger.info("Rendering template within #{layout.path_without_format_and_extension}") if logger && layout
+ layout = layout.path_without_format_and_extension if layout
if content_type = options[:content_type]
response.content_type = content_type.to_s
@@ -27,6 +27,7 @@ module Caching
autoload :Actions, 'action_controller/caching/actions'
autoload :Fragments, 'action_controller/caching/fragments'
autoload :Pages, 'action_controller/caching/pages'
+ autoload :Sweeper, 'action_controller/caching/sweeping'
autoload :Sweeping, 'action_controller/caching/sweeping'
def self.included(base) #:nodoc:
@@ -47,6 +47,11 @@ def self.dispatch_cgi(app, cgi, out = $stdout)
out.sync = false if out.respond_to?(:sync=)
headers['Status'] = status.to_s
+
+ if headers.include?('Set-Cookie')
+ headers['cookie'] = headers.delete('Set-Cookie').split("\n")
+ end
+
out.write(cgi.header(headers))
body.each { |part|
@@ -41,7 +41,7 @@ module ActionController #:nodoc:
# * <tt>:expires</tt> - The time at which this cookie expires, as a Time object.
# * <tt>:secure</tt> - Whether this cookie is a only transmitted to HTTPS servers.
# Default is +false+.
- # * <tt>:http_only</tt> - Whether this cookie is accessible via scripting or
+ # * <tt>:httponly</tt> - Whether this cookie is accessible via scripting or
# only HTTP. Defaults to +false+.
module Cookies
def self.included(base)
@@ -7,7 +7,6 @@ def define_dispatcher_callbacks(cache_classes)
unless cache_classes
# Development mode callbacks
before_dispatch :reload_application
- after_dispatch :cleanup_application
ActionView::Helpers::AssetTagHelper.cache_asset_timestamps = false
end
@@ -89,20 +88,17 @@ def _call(env)
end
def reload_application
+ # Cleanup the application before processing the current request.
+ ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord)
+ ActiveSupport::Dependencies.clear
+ ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord)
+
# Run prepare callbacks before every request in development mode
run_callbacks :prepare_dispatch
Routing::Routes.reload
end
- # Cleanup the application by clearing out loaded classes so they can
- # be reloaded on the next request without restarting the server.
- def cleanup_application
- ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord)
- ActiveSupport::Dependencies.clear
- ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord)
- end
-
def flush_logger
Base.logger.flush
end
@@ -183,7 +183,7 @@ def validate_digest_response(request, realm, &password_procedure)
if valid_nonce && realm == credentials[:realm] && opaque(request.session.session_id) == credentials[:opaque]
password = password_procedure.call(credentials[:username])
- expected = expected_response(request.env['REQUEST_METHOD'], request.url, credentials, password)
+ expected = expected_response(request.env['REQUEST_METHOD'], credentials[:uri], credentials, password)
expected == credentials[:response]
end
end
@@ -327,7 +327,7 @@ def process(method, path, parameters = nil, headers = nil)
@headers = Rack::Utils::HeaderHash.new(headers)
- (@headers['Set-Cookie'] || []).each do |cookie|
+ (@headers['Set-Cookie'] || "").split("\n").each do |cookie|
name, value = cookie.match(/^([^=]*)=([^;]*);/)[1,2]
@cookies[name] = value
end
@@ -1,3 +0,0 @@
-require 'action_controller/rack_ext/lock'
-require 'action_controller/rack_ext/multipart'
-require 'action_controller/rack_ext/parse_query'
@@ -1,21 +0,0 @@
-module Rack
- # Rack::Lock was commited to Rack core
- # http://github.com/rack/rack/commit/7409b0c
- # Remove this when Rack 1.0 is released
- unless defined? Lock
- class Lock
- FLAG = 'rack.multithread'.freeze
-
- def initialize(app, lock = Mutex.new)
- @app, @lock = app, lock
- end
-
- def call(env)
- old, env[FLAG] = env[FLAG], false
- @lock.synchronize { @app.call(env) }
- ensure
- env[FLAG] = old
- end
- end
- end
-end
@@ -1,22 +0,0 @@
-module Rack
- module Utils
- module Multipart
- class << self
- def parse_multipart_with_rewind(env)
- result = parse_multipart_without_rewind(env)
-
- begin
- env['rack.input'].rewind if env['rack.input'].respond_to?(:rewind)
- rescue Errno::ESPIPE
- # Handles exceptions raised by input streams that cannot be rewound
- # such as when using plain CGI under Apache
- end
-
- result
- end
-
- alias_method_chain :parse_multipart, :rewind
- end
- end
- end
-end
@@ -1,17 +0,0 @@
-# Rack does not automatically cleanup Safari 2 AJAX POST body
-# This has not yet been commited to Rack, please +1 this ticket:
-# http://rack.lighthouseapp.com/projects/22435/tickets/19
-
-module Rack
- module Utils
- alias_method :parse_query_without_ajax_body_cleanup, :parse_query
- module_function :parse_query_without_ajax_body_cleanup
-
- def parse_query(qs, d = '&;')
- qs = qs.dup
- qs.chop! if qs[-1] == 0
- parse_query_without_ajax_body_cleanup(qs, d)
- end
- module_function :parse_query
- end
-end
@@ -417,15 +417,15 @@ def form_data?
FORM_DATA_MEDIA_TYPES.include?(content_type.to_s)
end
- # Override Rack's GET method to support nested query strings
+ # Override Rack's GET method to support indifferent access
def GET
- @env["action_controller.request.query_parameters"] ||= UrlEncodedPairParser.parse_query_parameters(query_string)
+ @env["action_controller.request.query_parameters"] ||= normalize_parameters(super)
end
alias_method :query_parameters, :GET
- # Override Rack's POST method to support nested query strings
+ # Override Rack's POST method to support indifferent access
def POST
- @env["action_controller.request.request_parameters"] ||= UrlEncodedPairParser.parse_hash_parameters(super)
+ @env["action_controller.request.request_parameters"] ||= normalize_parameters(super)
end
alias_method :request_parameters, :POST
@@ -461,5 +461,28 @@ def server_port
def named_host?(host)
!(host.nil? || /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.match(host))
end
+
+ # Convert nested Hashs to HashWithIndifferentAccess and replace
+ # file upload hashs with UploadedFile objects
+ def normalize_parameters(value)
+ case value
+ when Hash
+ if value.has_key?(:tempfile)
+ upload = value[:tempfile]
+ upload.extend(UploadedFile)
+ upload.original_path = value[:filename]
+ upload.content_type = value[:type]
+ upload
+ else
+ h = {}
+ value.each { |k, v| h[k] = normalize_parameters(v) }
+ h.with_indifferent_access
+ end
+ when Array
+ value.map { |e| normalize_parameters(e) }
+ else
+ value
+ end
+ end
end
end
@@ -38,7 +38,7 @@ module Rescue
'ActionView::TemplateError' => 'template_error'
}
- RESCUES_TEMPLATE_PATH = ActionView::Template::EagerPath.new(
+ RESCUES_TEMPLATE_PATH = ActionView::Template::EagerPath.new_and_loaded(
File.join(File.dirname(__FILE__), "templates"))
def self.included(base) #:nodoc:
@@ -41,7 +41,7 @@ class Response < Rack::Response
def initialize
@status = 200
- @header = DEFAULT_HEADERS.dup
+ @header = Rack::Utils::HeaderHash.new(DEFAULT_HEADERS)
@writer = lambda { |x| @body << x }
@block = nil
@@ -144,7 +144,6 @@ def prepare!
set_content_length!
convert_content_type!
convert_language!
- convert_expires!
convert_cookies!
end
@@ -167,33 +166,15 @@ def write(str)
str
end
- # Over Rack::Response#set_cookie to add HttpOnly option
def set_cookie(key, value)
- case value
- when Hash
- domain = "; domain=" + value[:domain] if value[:domain]
- path = "; path=" + value[:path] if value[:path]
- # According to RFC 2109, we need dashes here.
- # N.B.: cgi.rb uses spaces...
- expires = "; expires=" + value[:expires].clone.gmtime.
- strftime("%a, %d-%b-%Y %H:%M:%S GMT") if value[:expires]
- secure = "; secure" if value[:secure]
- httponly = "; HttpOnly" if value[:http_only]
- value = value[:value]
- end
- value = [value] unless Array === value
- cookie = ::Rack::Utils.escape(key) + "=" +
- value.map { |v| ::Rack::Utils.escape v }.join("&") +
- "#{domain}#{path}#{expires}#{secure}#{httponly}"
-
- case self["Set-Cookie"]
- when Array
- self["Set-Cookie"] << cookie
- when String
- self["Set-Cookie"] = [self["Set-Cookie"], cookie]
- when nil
- self["Set-Cookie"] = cookie
+ if value.has_key?(:http_only)
+ ActiveSupport::Deprecation.warn(
+ "The :http_only option in ActionController::Response#set_cookie " +
+ "has been renamed. Please use :httponly instead.", caller)
+ value[:httponly] ||= value.delete(:http_only)
end
+
+ super(key, value)
end
private
@@ -236,18 +217,14 @@ def set_content_length!
elsif length = headers['Content-Length']
headers['Content-Length'] = length.to_s
elsif !body.respond_to?(:call) && (!status || status.to_s[0..2] != '304')
- headers["Content-Length"] = body.size.to_s
+ headers["Content-Length"] = (body.respond_to?(:bytesize) ? body.bytesize : body.size).to_s
end
end
def convert_language!
headers["Content-Language"] = headers.delete("language") if headers["language"]
end
- def convert_expires!
- headers["Expires"] = headers.delete("") if headers["expires"]
- end
-
def convert_cookies!
headers['Set-Cookie'] = Array(headers['Set-Cookie']).compact
end
Oops, something went wrong.

0 comments on commit d8f1ee4

Please sign in to comment.