about summary refs log tree commit homepage
path: root/test/test_wbuf.rb
DateCommit message (Collapse)
2016-07-12wbuf_lite: use StringIO instead of TmpIO
This allows us to work transparently with our OpenSSL workaround[*] while allowing us to reuse our non-sendfile compatibility code. Unfortunately, this means we duplicate a lot of code from the normal wbuf code for now; but that should be fairly stable at this point. [*] https://bugs.ruby-lang.org/issues/12085
2016-06-06wbuf: remove tmpdir parameter
We can retrieve it when we actually need to create the temporary file. This saves an ivar slot and method dispatch parameters. This patch is nice, unfortunately the patch which follows is not :P
2016-06-05wbuf: remove needless "busy" parameter
@busy will be reset on wbuf_write anyways, since there is no initial data and we will always attempt to write to the socket aggressively.
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-12-01test_wbuf: deal with proper zero-copy for Unix sockets
Linux 4.2 gained the ability to do true zero-copy sendfile support for Unix sockets; so buffer space is accounted differently. Previously Linux only avoided copies in userspace when doing sendfile for Unix sockets, not internally within the kernel. This kernel change has no bearing on normal code which would need to account for concurrent draining by the client; only test code designed to create a failure condition.
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-04-03wbuf: store busy signal inside this object
This should make it easier to track state for asynchronous proxy_pass buffering.
2014-05-12test_wbuf: workaround Linux-specific behavior
Followup-to commit ade89b5142bedbcf07f38aa062bfdbfcb8bc48d3 ("wbuf: hack to avoid response corruption on FreeBSD") It seems that we cannot test wbuf internals reliably outside of Linux, however as long as the end result (via HTTP) is unchanged on other OSes, we seem to be doing OK.
2014-02-08wbuf_common: avoid trysendfile on empty sf_count
We may unnecessarily drop persistent connections from this bug, and we had an incorrect assertion in our unit test, even.
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-11-01input and output buffers support tmpdir: arguments
This allows users to specify alternative temporary directories in case buffers get too large for one filesystem to handle or to give priority to some clients on certain ports.
2013-11-01wbuf: bypass buffering if buffers are caught up
Sometimes buffering can catch up and we no longer need to use the on-disk buffer, so keep trying to flush the data out to the user to avoid VFS activity.
2013-10-25enforce FD_CLOEXEC on all pipes, including tests
We need to prevent FD leakage on Ruby 1.9.3
2013-10-21test_wbuf: avoid floating point arg to read_nonblock
This is a legitimate bug in our code caught by Rubinius. MRI strangely just truncates. I suppose that makes sense coming from some systems.
2013-10-21tests: support disabling parallelization env
Temporarily disabling parallel tests maybe needed to diagnose some problems with tests.
2013-10-18initial commit