blob: d4541e0570ccb3da3cc0b3fc0c2b83ab6a88a877 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$LOAD_PATH << File.expand_path("../../lib", __FILE__)
require "plum/rack"
class App2
def call(env)
if env["REQUEST_METHOD"] == "GET" && env["PATH_INFO"] == "/"
[
200,
{ "Content-Type" => "text/html" },
["8 bytes-" * 512]
]
else
[
404,
{ "Content-Type" => "text/html" },
["#{env["REQUEST_METHOD"]} #{env["PATH_INFO"]}"]
]
end
end
end
run App2.new
|