Welcome! Log In Create A New Profile

Advanced

[PATCH] Test proxy_unfinished: limit sndbuf to force buffering on no proxy temp

Markus Linnala
April 15, 2014 10:58AM
# HG changeset patch
# User Markus Linnala <Markus.Linnala@cybercom.com>
# Date 1397505734 -10800
# Mon Apr 14 23:02:14 2014 +0300
# Node ID a548e5a5cf251ee97fb782d6b9e6c374389782ea
# Parent 74a015aad3521ffef6b404cdaa9eafd991824301
Test proxy_unfinished: limit sndbuf to force buffering on no proxy temp

With some systems (Fedora-20 Linux 3.13) socket buffers are huge and
nginx does not use temp files when proxying. Set sndbuf to small
values to make use of temp files around 90k sent. Currently there is
no way to force temp buffers. If sndbuf is more than 36k test seems to
fail.

no proxy temp should fail on 1.5.2 and work okay on later versions.

sub_filter forces chunked encoding and so it is possible to notice
problem because last chunk is 0 chunk when there is error.

http://trac.nginx.org/nginx/ticket/541

I did not notice any changes with sleep or limited proxy buffers.
So I dropped them.

Changed patch as per suggestion from Maxim Dounin.

diff -r 74a015aad352 -r a548e5a5cf25 proxy_unfinished.t
--- a/proxy_unfinished.t Mon Mar 17 16:02:19 2014 +0400
+++ b/proxy_unfinished.t Mon Apr 14 23:02:14 2014 +0300
@@ -50,7 +50,7 @@
keys_zone=one:1m;

server {
- listen 127.0.0.1:8080;
+ listen 127.0.0.1:8080 sndbuf=4k;
server_name localhost;

location / {
@@ -76,8 +76,6 @@
sub_filter foo bar;
sub_filter_types *;
proxy_pass http://127.0.0.1:8080/local/;
- proxy_buffer_size 1k;
- proxy_buffers 4 1k;
}

location /local/ {
@@ -159,7 +157,7 @@
# no final chunk

chmod(0000, $t->testdir() . '/proxy_temp');
-like(http_get_11('/proxy/big.html', sleep => 0.5),
+like(http_get_11('/proxy/big.html'),
qr/X(?!.*\x0d\x0a?0\x0d\x0a?)/s, 'no proxy temp');

}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 1] nginx-test proxy_unfinished fix for huge buffers

Markus Linnala 690 April 15, 2014 08:28AM

[PATCH 1 of 1] Test proxy_unfinished: limit buffers to force buffering on no proxy temp

Markus Linnala 368 April 15, 2014 08:28AM

Re: [PATCH 1 of 1] Test proxy_unfinished: limit buffers to force buffering on no proxy temp

Maxim Dounin 299 April 15, 2014 09:06AM

Re: [PATCH 1 of 1] Test proxy_unfinished: limit buffers to force buffering on no proxy temp

Markus Linnala 298 April 15, 2014 10:52AM

[PATCH] Test proxy_unfinished: limit sndbuf to force buffering on no proxy temp

Markus Linnala 347 April 15, 2014 10:58AM

Re: [PATCH 1 of 1] Test proxy_unfinished: limit buffers to force buffering on no proxy temp

Maxim Dounin 357 April 15, 2014 02:08PM

Re: [PATCH 1 of 1] Test proxy_unfinished: limit buffers to force buffering on no proxy temp

Homutov Vladimir 302 April 15, 2014 01:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 128
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready