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

21 commits

Author SHA1 Message Date
Francesco Rodriguez
b638dd1948 Use Minitest instead of Test::Unit (#1152)
* Bump minitest version.

* Add basic test helper file.

* Use minitest for web server tests.

* Use Minitest for unix socket tests.

* Use Minitest for ThreadPool tests.

* Use Minitest for TCP-Rack tests

* Use Minitest for TCPLogger tests.

* Add missing helper to test helpers.

* Use Minitest for Rack server tests.

* Use Minitest for Rack handler tests.

* Use Minitest for Puma::Server tests.

* Use Minitest for Puma::Server with SSL tests.

* Use Minitest for persisten connections tests.

* Require puma in test_helper file.

* Use minitest for Puma::NullIO tests.

* Remove unnecessary requires on test files.

* Use Minitest for MiniSSL tests.

* Use Minitest for IOBuffer tests.

* Require bundler/setup in Rakefile.

* Use Minitest for HttpParser tests.

* Use Minitest for Puma::Configuration tests.

* Use Minitest for Puma::CLI tests.

* Bump Minitest version for Ruby 2.1 Gemfile.

* Use Minitest for integration tests.

* Use Minitest for Puma::App::Status tests.

* Remove test-unit from Gemfiles.

* Add timeout helper to Minitest::Test.

* Use Minitest for Puma::Binder tests.

* Remove testhelp file.

* Add missing require to Puma::Binder tests.

* Prefer require instead of require_relative.
2016-11-22 08:05:49 -07:00
Matt Larraz
64d4dabca7 Use Timeout.timeout instead of Object.timeout 2016-01-14 20:45:20 -06:00
Matthew Draper
1ba0999685 Skip empty parts when chunking
A zero-length chunk has a protocol-significant meaning: it signals the
end of the response. An empty part in a Rack body has no such meaning,
so we should just skip it.
2015-07-18 09:01:33 +09:30
iaintshine
be9b5e978b Proper 'Connection' header handling compatible with HTTP 1.0 and HTTP 1.1 protocols 2015-02-19 14:43:17 +01:00
Evan Phoenix
de8148d243 Add test for keepalive causing starvation 2012-07-23 11:24:22 -07:00
Konstantin Haase
e4a4eb964e Support responses without entity body
Some HTTP verbs imply that no body is sent with
the response. Puma did not respect that.

This led to issues like this one:

    $ curl localhost:9292
    curl: (18) transfer closed with outstanding
    read data remaining

This also breaks persistent connections.

Example program to program to provoke this issue:

    proc do
      [204, {'Conten-Type' => 'text/plain'}, []]
    end

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
2011-12-21 09:17:19 -08:00
Evan Phoenix
bcdd5357fb Use a singleton null object for empty request bodies 2011-12-01 14:33:34 -08:00
Evan Phoenix
d0a2fac2ac Send the proper headers to HTTP/1.0 in keep-alive
Seems that an HTTP/1.0 client needs to be told that the connection is
still in keep alive mode by setting the Connection header to Keep-Alive.

This makes sense because a server could deny the request and thus no
Connection header means close mode.
2011-11-30 15:07:23 -08:00
Evan Phoenix
220c4aae1c Handle not exposing the next request to the last one 2011-11-22 11:51:59 -08:00
Evan Phoenix
7ab7b2b9e9 Fix a POST then GET in a persistent connection 2011-11-22 11:51:59 -08:00
Evan Phoenix
8cbc6a3ee9 Allow an app to do it's own chunked encoding 2011-10-22 23:12:04 -07:00
Evan Phoenix
8ffe623bf9 Fix terminating a chunked encoding stream 2011-10-20 23:04:24 -07:00
Evan Phoenix
982afa3779 Disable chunked mode for http/1.0 2011-10-17 23:08:09 -07:00
Evan Phoenix
2359bb1f5b Correctly handle multiple requests received in one chunk 2011-10-17 22:47:35 -07:00
Evan Phoenix
b7953adb67 Honor if an app sets Content-Length 2011-10-17 13:56:54 -07:00
Evan Phoenix
44cd2583aa Add timeout support to persistent connections 2011-10-04 21:11:10 -07:00
Evan Phoenix
2a9ecc9d63 Fix test naming 2011-10-03 14:44:18 -07:00
Konstantin Haase
357b3cbbe7 proper persistent connection behavior for HTTP 1.0 2011-10-03 14:40:14 -07:00
Evan Phoenix
bcb630c017 Fix early termination of headers bug 2011-10-03 14:04:57 -07:00
Evan Phoenix
89ea73cee5 Make sure that the chunk is specified in hex, not dec 2011-09-30 11:05:44 -05:00
Evan Phoenix
997c186406 Add persistence and chunked transfer support 2011-09-30 10:30:37 -05:00