Skip to content
Extraits de code Groupes Projets
Valider 84c8b468 rédigé par Florian Staudacher's avatar Florian Staudacher
Parcourir les fichiers

Merge branch 'hotfix/3499-chromeframe' into develop

parents 8674f5ae fd271376
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -17,7 +17,7 @@ module Rack ...@@ -17,7 +17,7 @@ module Rack
status, headers, response = @app.call(env) status, headers, response = @app.call(env)
new_body = insert_tag(build_response_body(response)) new_body = insert_tag(build_response_body(response))
new_headers = recalculate_body_length(headers, new_body) new_headers = recalculate_body_length(headers, new_body)
return [status, new_headers, new_body] return [status, new_headers, [new_body]]
elsif @options[:minimum].nil? or ie_version(env['HTTP_USER_AGENT']) < @options[:minimum] elsif @options[:minimum].nil? or ie_version(env['HTTP_USER_AGENT']) < @options[:minimum]
html = <<-HTML html = <<-HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
...@@ -42,6 +42,10 @@ module Rack ...@@ -42,6 +42,10 @@ module Rack
def build_response_body(response) def build_response_body(response)
response_body = "" response_body = ""
response.each { |part| response_body += part } response.each { |part| response_body += part }
# see: http://johnbintz.github.com/blog/2012/03/05/closing-given-body-in-rack-middleware/
response.close if response.respond_to?(:close)
response_body response_body
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter