lib/rack/lobster.rb in rack-1.6.0.beta vs lib/rack/lobster.rb in rack-1.6.0.beta2
- old
+ new
@@ -10,11 +10,11 @@
P6jy9i4k9EQyGAnBarEXeCBqSkntNXsi/ZCvC48zGQoZKikGrFMZvgS5ZHd+aGWVuWwhVF0
t1drVmiR42HcWNz5w3QanT+2gIvTVCiE1lm1Y0eU4JGmIIbaKwextKn8rvW+p5PIwFl8ZWJ
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")
href = "?"
else
@@ -24,10 +24,10 @@
content = ["<title>Lobstericious!</title>",
"<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)
req = Request.new(env)
if req.GET["flip"] == "left"