<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
<br>
Tested your patch, everything is fine, 2 hours my server working
without any messages in log about deflate problems.<br>
<br>
NGINX the best :)<br>
<br>
Just in case want to ask about one variable, nginx have $host variable,
but it using resolver, in my case I don't need it because I already
have this info in NAT table (my traffic goes to nginx from rdr pf rule).<br>
So the question is, what do you think about having var like $nat_ip
which will get dest ip using <br>
ioctl(dev, DIOCNATLOOK, &amp;nl)? In my case it will decrease extra
dependency from named.<br>
<br>
On 11/18/2010 07:29 PM, Maxim Dounin wrote:
<blockquote cite="mid:20101119032930.GJ44164@mdounin.ru" type="cite">
  <pre wrap="">Hello!

On Thu, Nov 18, 2010 at 02:45:22PM -0800, Roman Vasilyev wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">I've reproduced this problem with debuging.
Let me attach error log with debug, I'm not clearly understanding
nginx modules chain
    </pre>
  </blockquote>
  <pre wrap="">
[...]

  </pre>
  <blockquote type="cite">
    <pre wrap="">2010/11/18 14:42:23 [debug] 24622#0: *206 http upstream process non
buffered upstream
    </pre>
  </blockquote>
  <pre wrap="">
[...]

  </pre>
  <blockquote type="cite">
    <pre wrap="">2010/11/18 14:42:23 [debug] 24622#0: *206 http gunzip filter
2010/11/18 14:42:23 [debug] 24622#0: *206 gunzip in: 00000000055590E8
2010/11/18 14:42:23 [debug] 24622#0: *206 gunzip
in_buf:0000000005559108 ni:00000000012021A0 ai:10
2010/11/18 14:42:23 [debug] 24622#0: *206 inflate in:
ni:00000000012021A0 no:0000000005559940 ai:10 ao:4096 fl:2 redo:0
2010/11/18 14:42:23 [debug] 24622#0: *206 inflate out:
ni:00000000012021AA no:0000000005559940 ai:0 ao:4096 rc:0
2010/11/18 14:42:23 [debug] 24622#0: *206 gunzip
in_buf:0000000005559108 pos:00000000012021A0
2010/11/18 14:42:23 [debug] 24622#0: *206 http afbody in
2010/11/18 14:42:23 [debug] 24622#0: *206 http chunk size: 0
2010/11/18 14:42:23 [debug] 24622#0: *206 http afbody out
2010/11/18 14:42:23 [debug] 24622#0: *206 http postpone filter
"/?ar=1290119308" 00000000055590D8
2010/11/18 14:42:23 [debug] 24622#0: *206 http gzip filter
2010/11/18 14:42:23 [debug] 24622#0: *206 gzip in: 00000000055590C8
2010/11/18 14:42:23 [debug] 24622#0: *206 gzip
in_buf:0000000005559158 ni:0000000000000000 ai:0
2010/11/18 14:42:23 [debug] 24622#0: *206 deflate in:
ni:0000000000000000 no:00000000056BDE20 ai:0 ao:8192 fl:2 redo:0
2010/11/18 14:42:23 [alert] 24622#0: *206 deflate() failed: 2, -5
while reading upstream, client: 10.222.16.2, server: hss, request:
"GET /?ar=1290119308 HTTP/1.1", upstream:
<a class="moz-txt-link-rfc2396E" href="http://74.125.19.103:80/?ar=1290119308">"http://74.125.19.103:80/?ar=1290119308"</a>, host: "news.google.com",
referrer: <a class="moz-txt-link-rfc2396E" href="http://news.google.com/">"http://news.google.com/"</a>
    </pre>
  </blockquote>
  <pre wrap="">
Ah, ok, the problem is clear: due to use of proxy_buffered off; 
buffer had flush flag set.  All data from it was eaten by gunzip 
filter, and special flush buffer was passed along filter chain 
instead.

The only way to reproduce this problem without third party modules 
(i.e. gunzip filter and your local modifications to it in your 
case) seems to use $r-&gt;flush() twice from embedded perl, see test 
case here:

<a class="moz-txt-link-freetext" href="http://mdounin.ru/hg/nginx-tests/rev/e8546edb0267">http://mdounin.ru/hg/nginx-tests/rev/e8546edb0267</a>

Correct patch to the problem attached.

It basically lines up gzip filter to what is already done in 
gunzip filter - allows Z_BUF_ERROR as non-fatal and makes sure 
special flush buffer will be passed if there is no output in 
Z_SYNC_FLUSH case.

Maxim Dounin
  </pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a>
  </pre>
</blockquote>
<br>
</body>
</html>