[PATCH] Tests: adjusted proxy_noclose.t no content length test

Maxim Dounin mdounin at mdounin.ru
Fri Aug 21 02:09:40 UTC 2026


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1787277927 -10800
#      Fri Aug 21 05:05:27 2026 +0300
# Node ID 7ff424bd04651fe8531e3e85d7648e0dea2b41ac
# Parent  045716b534dfd3a5a7221bc8387050f63d238b78
Tests: adjusted proxy_noclose.t no content length test.

Partially read event pipe buffers are now flushed on read timeouts, so
the test finally passes.

Also, $SIG{__WARN__} redefinition was removed: it was only needed for
the "content-length actually used" test, which succeeds since
introduction of HTTP/1.1 support in 4126:bba9a5ccc6cd (nginx 1.1.4).

diff --git a/proxy_noclose.t b/proxy_noclose.t
--- a/proxy_noclose.t
+++ b/proxy_noclose.t
@@ -78,8 +78,7 @@ like(http_get('/multi'), qr/AND-THIS/, '
 like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used');
 
 TODO: {
-local $TODO = 'not yet';
-local $SIG{__WARN__} = sub {};
+local $TODO = 'not yet' unless $t->has_version('1.31.4');;
 
 like(http_get('/nolen'), qr/SEE-THIS/, 'bad backend - no content length');
 



More information about the nginx-devel mailing list