<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.5.3</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Perl: fixed syntax usage for C preprocessor directives.</title>
<updated>2013-07-29T13:30:01+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2013-07-29T13:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ab1c05272a4078454d6a529bffe6f5918a0c0468'/>
<id>ab1c05272a4078454d6a529bffe6f5918a0c0468</id>
<content type='text'>
As per perlxs, C preprocessor directives should be at the first
non-whitespace of a line to avoid interpreting them as comments.

#if and #endif are moved so that there are no blank lines before them
to retain them as part of the function body.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per perlxs, C preprocessor directives should be at the first
non-whitespace of a line to avoid interpreting them as comments.

#if and #endif are moved so that there are no blank lines before them
to retain them as part of the function body.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: reliably detect connection failures with SSL peers.</title>
<updated>2013-07-29T09:23:16+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2013-07-29T09:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e49d933ebccb5e86b749c94ddb378dafc28e435d'/>
<id>e49d933ebccb5e86b749c94ddb378dafc28e435d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: no last buffer on errors.</title>
<updated>2013-07-25T11:00:41+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T11:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=5274f023a243e4163bcdb1b93e00445e769a8ff9'/>
<id>5274f023a243e4163bcdb1b93e00445e769a8ff9</id>
<content type='text'>
Previously, after sending a header we always sent a last buffer and
finalized a request with code 0, even in case of errors.  In some cases
this resulted in a loss of ability to detect the response wasn't complete
(e.g. if Content-Length was removed from a response by gzip filter).

This change tries to propogate to a client information that a response
isn't complete in such cases.  In particular, with this change we no longer
pretend a returned response is complete if we wasn't able to create
a temporary file.

If an error code suggests the error wasn't fatal, we flush buffered data
and disable keepalive, then finalize request normally.  This allows to to
propogate information about a problem to a client, while still sending all
the data we've got from an upstream.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, after sending a header we always sent a last buffer and
finalized a request with code 0, even in case of errors.  In some cases
this resulted in a loss of ability to detect the response wasn't complete
(e.g. if Content-Length was removed from a response by gzip filter).

This change tries to propogate to a client information that a response
isn't complete in such cases.  In particular, with this change we no longer
pretend a returned response is complete if we wasn't able to create
a temporary file.

If an error code suggests the error wasn't fatal, we flush buffered data
and disable keepalive, then finalize request normally.  This allows to to
propogate information about a problem to a client, while still sending all
the data we've got from an upstream.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: request finalization rework.</title>
<updated>2013-07-25T11:00:29+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T11:00:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=78aacc838bac5c92fe92f8533526515766cfce15'/>
<id>78aacc838bac5c92fe92f8533526515766cfce15</id>
<content type='text'>
No semantic changes expected, though some checks are done differently.
In particular, the r-&gt;cached flag is no longer explicitly checked.  Instead,
we relay on u-&gt;header_sent not being set if a response is sent from
a cache.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No semantic changes expected, though some checks are done differently.
In particular, the r-&gt;cached flag is no longer explicitly checked.  Instead,
we relay on u-&gt;header_sent not being set if a response is sent from
a cache.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: NGX_HTTP_CLIENT_CLOSED_REQUEST no longer reset to 0.</title>
<updated>2013-07-25T11:00:25+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T11:00:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=86277254dda48d76f3617ceb8ee934dfddeb332f'/>
<id>86277254dda48d76f3617ceb8ee934dfddeb332f</id>
<content type='text'>
The NGX_HTTP_CLIENT_CLOSED_REQUEST code is allowed to happen after we
started sending a response (much like NGX_HTTP_REQUEST_TIME_OUT), so there
is no need to reset response code to 0 in this case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The NGX_HTTP_CLIENT_CLOSED_REQUEST code is allowed to happen after we
started sending a response (much like NGX_HTTP_REQUEST_TIME_OUT), so there
is no need to reset response code to 0 in this case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: added check if a response is complete.</title>
<updated>2013-07-25T11:00:12+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T11:00:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=960d0bfe344d70223fec74079378992897855cc3'/>
<id>960d0bfe344d70223fec74079378992897855cc3</id>
<content type='text'>
Checks were added to both buffered and unbuffered code paths to detect
and complain if a response is incomplete.  Appropriate error codes are
now passed to ngx_http_upstream_finalize_request().

With this change in unbuffered mode we now use u-&gt;length set to -1 as an
indicator that EOF is allowed per protocol and used to indicate response
end (much like its with p-&gt;length in buffered mode).  Proxy module was
changed to set u-&gt;length to 1 (instead of previously used -1) in case of
chunked transfer encoding used to comply with the above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checks were added to both buffered and unbuffered code paths to detect
and complain if a response is incomplete.  Appropriate error codes are
now passed to ngx_http_upstream_finalize_request().

With this change in unbuffered mode we now use u-&gt;length set to -1 as an
indicator that EOF is allowed per protocol and used to indicate response
end (much like its with p-&gt;length in buffered mode).  Proxy module was
changed to set u-&gt;length to 1 (instead of previously used -1) in case of
chunked transfer encoding used to comply with the above.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: u-&gt;length now defaults to -1 (API change).</title>
<updated>2013-07-25T10:58:11+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T10:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=416b922bd2c285551d195c1f33a3736775ea45e9'/>
<id>416b922bd2c285551d195c1f33a3736775ea45e9</id>
<content type='text'>
That is, by default we assume that response end is signalled by
a connection close.  This seems to be better default, and in line
with u-&gt;pipe-&gt;length behaviour.

Memcached module was modified accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That is, by default we assume that response end is signalled by
a connection close.  This seems to be better default, and in line
with u-&gt;pipe-&gt;length behaviour.

Memcached module was modified accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed store/cache of unfinished responses.</title>
<updated>2013-07-25T10:56:59+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T10:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=187f3948ed4de1e8886fd50cbe937816c25dede6'/>
<id>187f3948ed4de1e8886fd50cbe937816c25dede6</id>
<content type='text'>
In case of upstream eof, only responses with u-&gt;pipe-&gt;length == -1
are now cached/stored.  This ensures that unfinished chunked responses
are not cached.

Note well - previously used checks for u-&gt;headers_in.content_length_n are
preserved.  This provides an additional level of protection if protol data
disagree with Content-Length header provided (e.g., a FastCGI response
is sent with wrong Content-Length, or an incomple SCGI or uwsgi response),
as well as protects from storing of responses to HEAD requests.  This should
be reconsidered if we'll consider caching of responses to HEAD requests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of upstream eof, only responses with u-&gt;pipe-&gt;length == -1
are now cached/stored.  This ensures that unfinished chunked responses
are not cached.

Note well - previously used checks for u-&gt;headers_in.content_length_n are
preserved.  This provides an additional level of protection if protol data
disagree with Content-Length header provided (e.g., a FastCGI response
is sent with wrong Content-Length, or an incomple SCGI or uwsgi response),
as well as protects from storing of responses to HEAD requests.  This should
be reconsidered if we'll consider caching of responses to HEAD requests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: replaced u-&gt;pipe-&gt;temp_file with p-&gt;temp_file.</title>
<updated>2013-07-25T10:56:49+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T10:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=eafe44ff7995ab32c7935495ce0905530a104ec9'/>
<id>eafe44ff7995ab32c7935495ce0905530a104ec9</id>
<content type='text'>
While here, redundant parentheses removed.  No functional changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While here, redundant parentheses removed.  No functional changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: NGX_ERROR after pipe errors.</title>
<updated>2013-07-25T10:56:41+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-07-25T10:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e6122efbfe50fbd7724a940f4433948c2612a397'/>
<id>e6122efbfe50fbd7724a940f4433948c2612a397</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
