<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.15.4</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Cache: status must be less then 599 in *_cache_valid directives.</title>
<updated>2018-09-24T17:26:46+00:00</updated>
<author>
<name>Gena Makhomed</name>
<email>gmm@csdoc.com</email>
</author>
<published>2018-09-24T17:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=1065455289d72b140f9e63a420b531eaae2d4039'/>
<id>1065455289d72b140f9e63a420b531eaae2d4039</id>
<content type='text'>
Previously, configurations with typo, for example

    fastcgi_cache_valid 200301 302 5m;

successfully pass configuration test. Adding check for status
codes &gt; 599, and such configurations are now properly rejected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, configurations with typo, for example

    fastcgi_cache_valid 200301 302 5m;

successfully pass configuration test. Adding check for status
codes &gt; 599, and such configurations are now properly rejected.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed bgcolor attribute on body in error pages and autoindex.</title>
<updated>2018-09-19T14:26:47+00:00</updated>
<author>
<name>Nova DasSarma</name>
<email>nova@novalinium.com</email>
</author>
<published>2018-09-19T14:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=8117b3f5a06b68afb292ddd19bf6ee6000707232'/>
<id>8117b3f5a06b68afb292ddd19bf6ee6000707232</id>
<content type='text'>
The bgcolor attribute overrides compatibility settings in browsers
and leads to undesirable behavior when the default font color is set
to white in the browser, since font-color is not also overridden.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bgcolor attribute overrides compatibility settings in browsers
and leads to undesirable behavior when the default font color is set
to white in the browser, since font-color is not also overridden.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite: removed r-&gt;err_status special handling (ticket #1634).</title>
<updated>2018-09-21T12:59:33+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-21T12:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a834b8aa09205922bf11c005b3c737b267be12bb'/>
<id>a834b8aa09205922bf11c005b3c737b267be12bb</id>
<content type='text'>
Trying to look into r-&gt;err_status in the "return" directive
makes it behave differently than real errors generated in other
parts of the code, and is an endless source of various problems.
This behaviour was introduced in 726:7b71936d5299 (0.4.4) with
the comment "fix: "return" always overrode "error_page" response code".
It is not clear if there were any real cases this was expected to fix,
but there are several cases which are broken due to this change, some
previously fixed (4147:7f64de1cc2c0).

In ticket #1634, the problem is that when r-&gt;err_status is set to
a non-special status code, it is not possible to return a response
by simply returning r-&gt;err_status.  If this is the case, the only
option is to return script's e-&gt;status instead.  An example
configuration:

    location / {
        error_page 404 =200 /err502;
        return 404;
    }

    location = /err502 {
        return 502;
    }

After the change, such a configuration will properly return
standard 502 error, much like it happens when a 502 error is
generated by proxy_pass.

This also fixes the following configuration to properly close
connection as clearly requested by "return 444":

    location / {
        error_page 404 /close;
        return 404;
    }

    location = /close {
        return 444;
    }

Previously, this required "error_page 404 = /close;" to work
as intended.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trying to look into r-&gt;err_status in the "return" directive
makes it behave differently than real errors generated in other
parts of the code, and is an endless source of various problems.
This behaviour was introduced in 726:7b71936d5299 (0.4.4) with
the comment "fix: "return" always overrode "error_page" response code".
It is not clear if there were any real cases this was expected to fix,
but there are several cases which are broken due to this change, some
previously fixed (4147:7f64de1cc2c0).

In ticket #1634, the problem is that when r-&gt;err_status is set to
a non-special status code, it is not possible to return a response
by simply returning r-&gt;err_status.  If this is the case, the only
option is to return script's e-&gt;status instead.  An example
configuration:

    location / {
        error_page 404 =200 /err502;
        return 404;
    }

    location = /err502 {
        return 502;
    }

After the change, such a configuration will properly return
standard 502 error, much like it happens when a 502 error is
generated by proxy_pass.

This also fixes the following configuration to properly close
connection as clearly requested by "return 444":

    location / {
        error_page 404 /close;
        return 404;
    }

    location = /close {
        return 444;
    }

Previously, this required "error_page 404 = /close;" to work
as intended.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed socket leak with "return 444" in error_page (ticket #274).</title>
<updated>2018-09-21T12:59:30+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-21T12:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e4a3211e2f651c6f25466ba8a8337ea1aa020c53'/>
<id>e4a3211e2f651c6f25466ba8a8337ea1aa020c53</id>
<content type='text'>
Socket leak was observed in the following configuration:

    error_page 400 = /close;

    location = /close {
        return 444;
    }

The problem is that "return 444" triggers termination of the request,
and due to error_page termination thinks that it needs to use a posted
request to clear stack.  But at the early request processing where 400
errors are generated there are no ngx_http_run_posted_requests() calls,
so the request is only terminated after an external event.

Variants of the problem include "error_page 497" instead (ticket #695)
and various other errors generated during early request processing
(405, 414, 421, 494, 495, 496, 501, 505).

The same problem can be also triggered with "return 499" and "return 408"
as both codes trigger ngx_http_terminate_request(), much like "return 444".

To fix this, the patch adds ngx_http_run_posted_requests() calls to
ngx_http_process_request_line() and ngx_http_process_request_headers()
functions, and to ngx_http_v2_run_request() and ngx_http_v2_push_stream()
functions in HTTP/2.

Since the ngx_http_process_request() function is now only called via
other functions which call ngx_http_run_posted_requests(), the call
there is no longer needed and was removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Socket leak was observed in the following configuration:

    error_page 400 = /close;

    location = /close {
        return 444;
    }

The problem is that "return 444" triggers termination of the request,
and due to error_page termination thinks that it needs to use a posted
request to clear stack.  But at the early request processing where 400
errors are generated there are no ngx_http_run_posted_requests() calls,
so the request is only terminated after an external event.

Variants of the problem include "error_page 497" instead (ticket #695)
and various other errors generated during early request processing
(405, 414, 421, 494, 495, 496, 501, 505).

The same problem can be also triggered with "return 499" and "return 408"
as both codes trigger ngx_http_terminate_request(), much like "return 444".

To fix this, the patch adds ngx_http_run_posted_requests() calls to
ngx_http_process_request_line() and ngx_http_process_request_headers()
functions, and to ngx_http_v2_run_request() and ngx_http_v2_push_stream()
functions in HTTP/2.

Since the ngx_http_process_request() function is now only called via
other functions which call ngx_http_run_posted_requests(), the call
there is no longer needed and was removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Lingering close changed to handle NGX_AGAIN.</title>
<updated>2018-09-10T15:57:13+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-10T15:57:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=278be041ddbd91c28b496ca01213c47cbc96d958'/>
<id>278be041ddbd91c28b496ca01213c47cbc96d958</id>
<content type='text'>
The "do { c-&gt;recv() } while (c-&gt;read-&gt;ready)" form used in the
ngx_http_lingering_close_handler() is not really correct, as for
example with SSL c-&gt;read-&gt;ready may be still set when returning NGX_AGAIN
due to SSL_ERROR_WANT_WRITE.  Therefore the above might be an infinite loop.

This doesn't really matter in lingering close, as we shutdown write side
of the socket anyway and also disable renegotiation (and even without shutdown
and with renegotiation it requires using very large certificate chain and
tuning socket buffers to trigger SSL_ERROR_WANT_WRITE).  But for the sake of
correctness added an NGX_AGAIN check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "do { c-&gt;recv() } while (c-&gt;read-&gt;ready)" form used in the
ngx_http_lingering_close_handler() is not really correct, as for
example with SSL c-&gt;read-&gt;ready may be still set when returning NGX_AGAIN
due to SSL_ERROR_WANT_WRITE.  Therefore the above might be an infinite loop.

This doesn't really matter in lingering close, as we shutdown write side
of the socket anyway and also disable renegotiation (and even without shutdown
and with renegotiation it requires using very large certificate chain and
tuning socket buffers to trigger SSL_ERROR_WANT_WRITE).  But for the sake of
correctness added an NGX_AGAIN check.
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: disabled keepalive when sending control frames was blocked.</title>
<updated>2018-09-03T16:34:02+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-03T16:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=07dbfd00fff456d05007cc1f35bd5a5b1349ef08'/>
<id>07dbfd00fff456d05007cc1f35bd5a5b1349ef08</id>
<content type='text'>
If sending request body was not completed (u-&gt;request_body_sent is not set),
the upstream keepalive module won't save such a connection.  However, it
is theoretically possible (though highly unlikely) that sending of some
control frames can be blocked after the request body was sent.  The
ctx-&gt;output_blocked flag introduced to disable keepalive in such cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If sending request body was not completed (u-&gt;request_body_sent is not set),
the upstream keepalive module won't save such a connection.  However, it
is theoretically possible (though highly unlikely) that sending of some
control frames can be blocked after the request body was sent.  The
ctx-&gt;output_blocked flag introduced to disable keepalive in such cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: improved keepalive handling.</title>
<updated>2018-09-03T16:34:01+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-03T16:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=71e152debe7389574967639114dfa7a7107fec8d'/>
<id>71e152debe7389574967639114dfa7a7107fec8d</id>
<content type='text'>
The code is now able to parse additional control frames after
the response is received, and can send control frames as well.
This fixes keepalive problems as observed with grpc-c, which can
send window update and ping frames after the response, see
http://mailman.nginx.org/pipermail/nginx/2018-August/056620.html.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code is now able to parse additional control frames after
the response is received, and can send control frames as well.
This fixes keepalive problems as observed with grpc-c, which can
send window update and ping frames after the response, see
http://mailman.nginx.org/pipermail/nginx/2018-August/056620.html.
</pre>
</div>
</content>
</entry>
<entry>
<title>Uwsgi: added a check on maximum uwsgi request size.</title>
<updated>2018-09-03T16:17:06+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-03T16:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b71792b11086d9df748f36d02f93d360d135cd7c'/>
<id>b71792b11086d9df748f36d02f93d360d135cd7c</id>
<content type='text'>
Requested by Chris Caputo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requested by Chris Caputo.
</pre>
</div>
</content>
</entry>
<entry>
<title>Uwsgi: style.</title>
<updated>2018-09-03T16:17:01+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-09-03T16:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=07c3e79b64c793facb22ec498dd0fc1437645e55'/>
<id>07c3e79b64c793facb22ec498dd0fc1437645e55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed request chain traversal (ticket #1618).</title>
<updated>2018-08-24T09:19:37+00:00</updated>
<author>
<name>Vladimir Homutov</name>
<email>vl@nginx.com</email>
</author>
<published>2018-08-24T09:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=62821f1c99f3bdb79ddbef2386060a6deb192605'/>
<id>62821f1c99f3bdb79ddbef2386060a6deb192605</id>
<content type='text'>
The problem does not manifest itself currently, because in case of
non-buffered reading, chain link created by u-&gt;create_request method
consists of a single element.

Found by PVS-Studio.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem does not manifest itself currently, because in case of
non-buffered reading, chain link created by u-&gt;create_request method
consists of a single element.

Found by PVS-Studio.
</pre>
</div>
</content>
</entry>
</feed>
