toycol 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toycol/server.rb +7 -6
- data/lib/toycol/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1599308369b344cecc36881661fdf60b1ffa8866903939d5ea1380f87ca5e36b
|
4
|
+
data.tar.gz: b5a67a19b19a0357d13f3a55be989dd462f93a07981f5cb1d443cfd9af19be4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b9c04a590c8df7f1abfb0ffb7029a3ec55e0a26b4bb4c2fe54dd7b662b792ec1837460c6ba6b21d452bc5c1c0ee8cf5eed3b55b340d594145c4d0996e7a60bb
|
7
|
+
data.tar.gz: 6be10814f2a7666b7a95ec77a6e737970db8c4f9f238fdb5f0accef6f03eb3cf1c9106401a47e81494fc17ad8393219d3c0f025e778576065f1b86b3eac5db51
|
data/lib/toycol/server.rb
CHANGED
@@ -55,7 +55,7 @@ module Toycol
|
|
55
55
|
::Toycol::REQUEST_METHOD => "",
|
56
56
|
::Toycol::SERVER_NAME => "toycol_server",
|
57
57
|
::Toycol::SERVER_PORT => @port.to_s,
|
58
|
-
::Toycol::CONTENT_LENGTH => "",
|
58
|
+
::Toycol::CONTENT_LENGTH => "0",
|
59
59
|
::Toycol::RACK_VERSION => Rack::VERSION,
|
60
60
|
::Toycol::RACK_INPUT => stringio(""),
|
61
61
|
::Toycol::RACK_ERRORS => $stderr,
|
@@ -108,16 +108,17 @@ module Toycol
|
|
108
108
|
request_method, request_path, = request_line.split
|
109
109
|
request_path, query_string = request_path.split("?")
|
110
110
|
|
111
|
-
@env[REQUEST_METHOD] = request_method
|
112
|
-
@env[PATH_INFO] = request_path
|
113
|
-
@env[QUERY_STRING] = query_string || ""
|
111
|
+
@env[::Toycol::REQUEST_METHOD] = request_method
|
112
|
+
@env[::Toycol::PATH_INFO] = request_path
|
113
|
+
@env[::Toycol::QUERY_STRING] = query_string || ""
|
114
|
+
@env[::Toycol::CONTENT_LENGTH]
|
114
115
|
|
115
116
|
request_headers.each do |request_header|
|
116
117
|
k, v = request_header.split(":").map(&:strip)
|
117
|
-
@env[k.tr("-", "_").upcase] = v
|
118
|
+
@env["::Toycol::#{k.tr("-", "_").upcase}"] = v
|
118
119
|
end
|
119
120
|
|
120
|
-
@env[RACK_INPUT] = stringio(request_body)
|
121
|
+
@env[::Toycol::RACK_INPUT] = stringio(request_body)
|
121
122
|
end
|
122
123
|
end
|
123
124
|
end
|
data/lib/toycol/version.rb
CHANGED