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.
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.
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.
- 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
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]