about summary refs log tree commit homepage
path: root/test/server_helper.rb
DateCommit message (Collapse)
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02enable frozen_string_literal for Ruby 2.3+
There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-03-03extras/proxy_pass: log exceptions leading to 502
It may be useful for us to track down potential errors in our code or log when an upstream misbehaves.
2014-12-02test/test_ssl: skip test if SSL on older Rubies
We rely on exception-free non-blocking I/O for performance, so it is easier for us to avoid supporting new features on old Rubies.
2014-03-22tests: avoid autoclose when inheriting
GC will close redundantly and lead to EBADF when finalizing. This was probably harmless as the original IO objects remained marked; but do not count on it. Seeing EBADF in a MT process is a very bad sign (inadvertant information disclosure is only one race condition away). Fortunately, this bug was limited to our test suite :)
2014-02-04http_response: use kgio_syssend with MSG_MORE
If Content-Length is known, try to save some bandwidth by corking the headers until the body is sendable. This allows us to avoid sending an extra packet for small HTTP responses. This allows high-performance websites like YHBT.net to be served faster!
2013-11-06http_response: reorder wbuf_maybe on successful early flush
We can use the wbuf_close return value instead to ensure we close tmpio properly and follow the same code path as a normal (:wait_writable-triggering) buffered response would. Add a few tests to ensure we properly close the response body for exec_cgi, where I noticed zombies and started me down this rabbit hole looking for places where the response body was not closed properly.
2013-11-02account for truncated/expanded static files
When running a static file server, we must account for filesystem activity outside of our control where files may grow/shrink as they're being served. For truncated files, we must abort any persistent connections downloading a truncated file to avoid confusing clients because the Content-Length header was already set to the big value. We also must ensure (we already did so before this commit, this just adds a test for it) we do not send additional data when a file grows on us after we've started sending the response.
2013-10-26tests: increase mkserver use to reduce LoC
This reduces the amount of code we have in our tests to improve maintainability.
2013-10-26fix output buffer corner-case for static files
The write buffer may block on a single write and immediately become unblocked afterwards. We need to account for this odd corner case when serving static files; because clients can trigger strange corner cases like this.
2013-10-24implement + test Expect: 100-continue handling
This should speed up out-of-the-box performance with curl as well as allow input_buffering :lazy/true users to reject requests they don't like.
2013-10-23test/server_helper: fix undefined variable
Dump the backtrace for the timeout if we did not get anoher exception
2013-10-22tests: enforce close_on_exec on all client sockets
Leaking file descriptors may lead to out-of-FD situations in an MT test suite.
2013-10-22tests: do not lose exceptions on quit timeouts
We should see the reason for test failures.
2013-10-20test/server_helper: dump entire log on errors
Merely showing the error lines could discard useful information when tracking down bugs or problems with the tests.
2013-10-18test: cleanup socket usage and lifetimes
This should help prevent us from running out of FDs prematurely as our test suite becomes more multi-threaded. We can also use plain TCPSocket in tests where we inherit the file descriptor from the parent (w/o accept).
2013-10-18initial commit