puma 1.3.1-java → 1.4.0-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- data/History.txt +8 -0
- data/README.md +2 -2
- data/lib/puma/const.rb +2 -1
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/server.rb +3 -1
- data/test/test_puma_server.rb +21 -0
- metadata +2 -2
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -93,7 +93,7 @@ Puma comes with a builtin status/control app that can be used query and control
|
|
93
93
|
|
94
94
|
$ puma --control tcp://127.0.0.1:9293 --control-token foo
|
95
95
|
|
96
|
-
This
|
96
|
+
This directs puma to start the control server on localhost port 9293. Additionally, all requests to the control server will need to include `token=foo` as a query parameter. This allows for simple authentication. Check out https://github.com/puma/puma/blob/master/lib/puma/app/status.rb to see what the app has available.
|
97
97
|
|
98
98
|
## Restart
|
99
99
|
|
@@ -120,7 +120,7 @@ If you start puma with `-S some/path` then you can pass that same path to the `p
|
|
120
120
|
|
121
121
|
$ pumactl -S some/path restart
|
122
122
|
|
123
|
-
will cause the server to perform a restart. `pumactl` is a simple CLI frontend to the
|
123
|
+
will cause the server to perform a restart. `pumactl` is a simple CLI frontend to the control/status app described above.
|
124
124
|
|
125
125
|
## License
|
126
126
|
|
data/lib/puma/const.rb
CHANGED
@@ -25,7 +25,7 @@ module Puma
|
|
25
25
|
# too taxing on performance.
|
26
26
|
module Const
|
27
27
|
|
28
|
-
PUMA_VERSION = VERSION = "1.
|
28
|
+
PUMA_VERSION = VERSION = "1.4.0".freeze
|
29
29
|
|
30
30
|
# The default number of seconds for another request within a persistent
|
31
31
|
# session.
|
@@ -103,6 +103,7 @@ module Puma
|
|
103
103
|
RACK_INPUT = "rack.input".freeze
|
104
104
|
RACK_URL_SCHEME = "rack.url_scheme".freeze
|
105
105
|
RACK_AFTER_REPLY = "rack.after_reply".freeze
|
106
|
+
PUMA_SOCKET = "puma.socket".freeze
|
106
107
|
|
107
108
|
HTTP = "http".freeze
|
108
109
|
HTTPS = "https".freeze
|
data/lib/puma/puma_http11.jar
CHANGED
Binary file
|
data/lib/puma/server.rb
CHANGED
@@ -62,7 +62,7 @@ module Puma
|
|
62
62
|
"rack.multithread".freeze => true,
|
63
63
|
"rack.multiprocess".freeze => false,
|
64
64
|
"rack.run_once".freeze => true,
|
65
|
-
"SCRIPT_NAME".freeze => "",
|
65
|
+
"SCRIPT_NAME".freeze => ENV['SCRIPT_NAME'] || "",
|
66
66
|
|
67
67
|
# Rack blows up if this is an empty string, and Rack::Lint
|
68
68
|
# blows up if it's nil. So 'text/plain' seems like the most
|
@@ -398,6 +398,8 @@ module Puma
|
|
398
398
|
def handle_request(env, client, body, cl)
|
399
399
|
normalize_env env, client
|
400
400
|
|
401
|
+
env[PUMA_SOCKET] = client
|
402
|
+
|
401
403
|
if cl
|
402
404
|
body = read_body env, client, body, cl
|
403
405
|
return false unless body
|
data/test/test_puma_server.rb
CHANGED
@@ -76,4 +76,25 @@ class TestPumaServer < Test::Unit::TestCase
|
|
76
76
|
|
77
77
|
assert_equal "#{fifteen}#{fifteen}", data
|
78
78
|
end
|
79
|
+
|
80
|
+
def test_puma_socket
|
81
|
+
body = "HTTP/1.1 750 Upgraded to Awesome\r\nDone: Yep!\r\n"
|
82
|
+
@server.app = proc do |env|
|
83
|
+
io = env['puma.socket']
|
84
|
+
|
85
|
+
io.write body
|
86
|
+
|
87
|
+
io.close
|
88
|
+
|
89
|
+
[-1, {}, []]
|
90
|
+
end
|
91
|
+
|
92
|
+
@server.add_tcp_listener @host, @port
|
93
|
+
@server.run
|
94
|
+
|
95
|
+
sock = TCPSocket.new @host, @port
|
96
|
+
sock << "PUT / HTTP/1.0\r\n\r\nHello"
|
97
|
+
|
98
|
+
assert_equal body, sock.read
|
99
|
+
end
|
79
100
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.4.0
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Evan Phoenix
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-06-04 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|