lib/cas/client/rack.rb in cas-client-0.1.2.pre.p4 vs lib/cas/client/rack.rb in cas-client-0.1.2.pre.p5

- old
+ new

@@ -5,18 +5,16 @@ @app = app end def call(env) puts "CAS Client Called from Rack!" - status, headers, response = @app.call(env) + status, headers, body = @app.call(env) + puts "Middleware called. Status: #{status}, Headers: #{headers}" - response_body = "" - response.each { |part| response_body += part } - response_body += "CAS Client Called!!!" + body += "CAS Client Called!!!" + headers["Content-Length"] = body.length.to_s - headers["Content-Length"] = response_body.length.to_s - - [status, headers, response_body] + [status, headers, body] end end end end