summary refs log tree commit
path: root/lib/rack/lobster.rb
diff options
context:
space:
mode:
authorKonstantin Haase <konstantin.mailinglists@googlemail.com>2014-10-02 15:35:27 +0200
committerKonstantin Haase <konstantin.mailinglists@googlemail.com>2014-10-02 15:35:27 +0200
commitab172af1b63f0d8e91ce579dd2907c43b96cf82a (patch)
tree991037ede0df148b5aef7137f321591401f98d53 /lib/rack/lobster.rb
parenta71be3c914c10d1089238f4e21b029b885be4029 (diff)
parentdc53a8c26dc55d21240233b3d83d36efdef6e924 (diff)
downloadrack-ab172af1b63f0d8e91ce579dd2907c43b96cf82a.tar.gz
Merge pull request #737 from schneems/schneems/less-objects
Less allocated objects on each request
Diffstat (limited to 'lib/rack/lobster.rb')
-rw-r--r--lib/rack/lobster.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rack/lobster.rb b/lib/rack/lobster.rb
index 195bd945..b7d15278 100644
--- a/lib/rack/lobster.rb
+++ b/lib/rack/lobster.rb
@@ -12,7 +12,7 @@ module Rack
     I8jyiTlhTcYXkekJAzTyYN6E08A+dk8voBkAVTJQ==".delete("\n ").unpack("m*")[0])
 
     LambdaLobster = lambda { |env|
-      if env["QUERY_STRING"].include?("flip")
+      if env[QUERY_STRING].include?("flip")
         lobster = LobsterString.split("\n").
           map { |line| line.ljust(42).reverse }.
           join("\n")
@@ -26,7 +26,7 @@ module Rack
                  "<pre>", lobster, "</pre>",
                  "<a href='#{href}'>flip!</a>"]
       length = content.inject(0) { |a,e| a+e.size }.to_s
-      [200, {"Content-Type" => "text/html", "Content-Length" => length}, content]
+      [200, {CONTENT_TYPE => "text/html", CONTENT_LENGTH => length}, content]
     }
 
     def call(env)