1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

25 commits

Author SHA1 Message Date
schneems
5f722aa99e Fix jruby server tests
We were accidentally connecting to a `nil` port, in my previous tests. MRI will interpret this the same as port 0. Jruby will not and throws an error

```
Error: test_very_large_return(TestPumaServer): TypeError: can't convert nil into String
org/jruby/ext/socket/RubyTCPServer.java:102:in `initialize'
org/jruby/RubyIO.java:851:in `new'
```

This tests makes sure we're using a port number instead of nil.
2016-02-04 12:22:17 -06:00
schneems
f048f38416 Fix server tests
The tests all use a port which may not be available (it isn't always open on travis). Instead we can tell the tcp server to bind to port 0 which means it will find a free port, since the tests rely on sending data to that port, we must record the actual port connected to and retrieve that information from the server.
2016-02-04 10:15:41 -06:00
Evan Phoenix
d421a53825 Disable SSL tests when SSL isn't used 2015-11-06 11:00:58 -08:00
Costi
69449dc23a ruby 1.8.7 compatibility patches
1.8.7 doesn't have each_with_object, rand(range) or 1.9 hash syntax
2015-07-29 09:16:24 -05:00
Julik Tarkhanov
df2438943f Do not suppress Content-Length on partial hijack
The partial hijack API does not mandate that the server
handler will be removing any headers from the response, so if
the app has set a Content-Length header it should be kept intact.
2015-06-08 18:39:49 +02:00
iaintshine
be9b5e978b Proper 'Connection' header handling compatible with HTTP 1.0 and HTTP 1.1 protocols 2015-02-19 14:43:17 +01:00
Daniel Marcotte
c54807700c Add SSL support for JRuby
- Implement MiniSSL for JRuby

- Modify `Binder` and `MiniSSL::Context` to to accommodate the fact
that Java SSL demands a java keystore rather than a key/cert pair

- Change the MiniSSL native extension interface to take a
`MiniSSL::Context` rather than a key/cert pair so that each extension
can grab keys off the context as appropriate
2014-05-05 14:30:15 -07:00
Arthur Neves
e424eaf052
Add config to customize the default error message
Add a lowlevel_error_handler, so we can customize the default error
message.

example:

```
lowlevel_error_handler do
  [302, {'Content-Type' => 'text', 'Location' => 'foo.html'}, ['302 found']]
end
```

[fix #458]
2014-02-17 12:29:58 -05:00
Philip Wiebe
4bc8d66eac exposed @first_data_timeout for Server and added test case for 408 on timeout. 2014-01-30 17:55:44 -05:00
Evan Phoenix
b24920d3ed Add hook's and wire up a state hook 2013-09-13 09:56:39 -07:00
Evan Phoenix
f7f7733861 Fix sending Content-Type and Content-Length for no body status. Fixes #304 2013-07-05 22:16:46 -07:00
Daniel Huckstep
1bcc1b96e2 Don't crash when given a non-standard HTTP code 2013-07-05 15:40:34 -06:00
Evan Phoenix
a99a3f0bfe Don't leak info when not in development. Fixes #256 2013-07-01 16:48:17 -07:00
Evan Phoenix
831f09d5d9 Ignore the body on a HEAD request. Fixes #278 2013-06-18 14:27:46 -07:00
David Calavera
81461adac0 Make sure that the default port is 80 when the request doesn't include HTTP_X_FORWARDED_PROTO. 2013-02-19 19:31:38 -08:00
David Calavera
1c6c61b089 Respect the header HTTP_X_FORWARDED_PROTO when the host doesn't include a port number.
Otherwise rack generates urls like https://example.com:80/foo/bar
2013-02-19 19:23:02 -08:00
Evan Phoenix
63c9625230 Exclude JRuby from SSL test 2012-11-29 11:58:08 -08:00
Evan Phoenix
021e0f100e Properly check #syswrite's value for variable sized buffers. Fixes #170 2012-11-29 11:32:50 -08:00
Evan Phoenix
7adcb771a5 More work on the Java version, not working 2012-08-26 13:55:36 -07:00
Evan Phoenix
17a058a158 Minor cleanup and properly scope 2012-08-22 22:12:12 -07:00
Evan Phoenix
327e2013e1 Get OpenSSL driven version working 2012-08-22 22:06:47 -07:00
Evan Phoenix
0467ea2d0a Add puma.socket key for direct socket access 2012-06-04 12:00:11 -07:00
Evan Phoenix
5858b7dd98 Wait for the server to finish stopping 2012-05-15 16:38:22 -06:00
Evan Phoenix
a8bb212740 Use StringIO properly. Fixes #98
Oops, StringIO.new(str) is quite different from StringIO.new.write(str).
2012-05-15 16:19:28 -06:00
Evan Phoenix
0471babe5f Fix rack.url_scheme for SSL servers. Fixes #65 2012-04-11 12:16:26 -07:00