lib/lamby/handler.rb in lamby-2.5.3 vs lib/lamby/handler.rb in lamby-2.6.0

- old
+ new

@@ -29,18 +29,26 @@ def headers @headers end + def set_cookies + return @set_cookies if defined?(@set_cookies) + @set_cookies = if @headers && @headers['Set-Cookie'] + @headers.delete('Set-Cookie').split("\n") + end + end + def body @rbody ||= ''.tap do |rbody| @body.each { |part| rbody << part } end end def call return self if @called @status, @headers, @body = call_app + set_cookies @called = true self end def base64_encodeable?