about summary refs log tree commit homepage
path: root/test/test_proxy_pass_no_buffering.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-07-12test_proxy_pass_no_buffering: exclude rb/ru files, too
We may have temporary files lingering from concurrent multi-threaded tests in our forked child since FD_CLOFORK does not exist :P
2016-06-07proxy_pass: fix HTTP/1.0 backends on EOF w/o buffering
We must ensure we properly close connections to HTTP/1.0 backends even if we blocked writing on outgoing data.
2016-06-07test_proxy_pass_no_buffering: fix racy test
We can force output buffer files to a directory of our choosing to avoid being confused by temporary files from other tests polluting the process we care about.
2016-06-06wbuf_lite: fix write retries for OpenSSL sockets
OpenSSL can't handle write retries if we append to an existing string. Thus we must preserve the same string object upon retrying. Do that by utilizing the underlying Wbuf class which could already handles it transparently using trysendfile. However, we still avoiding the subtlety of wbuf_close_common reliance we previously used. ref: commit 551e670281bea77e727a732ba94275265ccae5f6 ("fix output buffering with SSL_write")
2016-06-05proxy_pass: redo "proxy_buffering: false"
Relying on @body.close in Yahns::WbufCommon#wbuf_close_common to resume reading the upstream response was too subtle and potentially racy. Instead use a new Yahns::WbufLite class which does exactly what we want for implementing this feature, and nothing more.
2016-06-03proxy_pass: support "proxy_buffering: false"
This may be useful to avoid wasting resources when proxying for an upstream which can already handle slow clients itself. It is impossible to completely disable buffering, this merely prevents gigantic amounts of buffering. This may be useful when an upstream can generate a gigantic response which would cause excessive disk I/O traffic if buffered by yahns. An example of this would be an upstream dynamically-generating a pack for a giant git (clone|fetch) operation. In other words, this option allows the upstream to react to backpressure from slow clients. It is not recommended to enable this unless your upstream server is capable of supporting slow clients.