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

29 commits

Author SHA1 Message Date
Nate Berkopec
d6efbb4ae0
Add @MSP-Greg's changes to TestPersistent 2019-09-11 14:12:57 +00:00
Nate Berkopec
9f4edf4c66
Cleanup tests, parallelize a few (#1850)
+ Some tests getting frozen_string_literal
+ Remove unneccessary bundler setup
+ Fewer/tighter sleeps
2019-07-27 09:47:19 -07:00
Richard Schneeman
0cd28f373a
Revert "[close #1811] Minimum Ruby version >= 2.5" 2019-06-14 14:00:54 -05:00
schneems
06bd72cfa5 $ bundle exec rubocop -a 2019-06-10 13:36:54 -05:00
schneems
0d28652c3e Avoid hardcoding ports
When a test that boots a server fails it may not properly close out the port. When this happens there is a cascading failure as all other tests that use that port also fail. It becomes hard to find the actual failure reason. This commit uses a new number of every time port is used.
2018-03-20 11:25:26 -05:00
Pat Allan
b25dc5d128 Updates for frozen string literal compatibility. (#1376) 2017-08-02 19:02:40 -06:00
Michael Grosser
9d93a0f62f make test_helper no longer be loaded as a test (#1283)
running `rake` loads all files starting with `test_` which is not supposed to also load the helper,
since the helper should be loaded by each test and is not a test itself.
2017-05-12 12:16:55 -07:00
Michael Grosser
d25ef26465 warn when bundler fails and avoid having to use -I to run tests (#1270) 2017-04-11 14:48:11 -07:00
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