<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.13.12</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Upstream: fixed u-&gt;conf-&gt;preserve_output (ticket #1519).</title>
<updated>2018-04-05T13:56:12+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-04-05T13:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f9e43a31544bb67f24703e1dad91ea51f49c7a16'/>
<id>f9e43a31544bb67f24703e1dad91ea51f49c7a16</id>
<content type='text'>
Previously, ngx_http_upstream_process_header() might be called after
we've finished reading response headers and switched to a different read
event handler, leading to errors with gRPC proxying.  Additionally,
the u-&gt;conf-&gt;read_timeout timer might be re-armed during reading response
headers (while this is expected to be a single timeout on reading
the whole response header).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, ngx_http_upstream_process_header() might be called after
we've finished reading response headers and switched to a different read
event handler, leading to errors with gRPC proxying.  Additionally,
the u-&gt;conf-&gt;read_timeout timer might be re-armed during reading response
headers (while this is expected to be a single timeout on reading
the whole response header).
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed ngx_http_upstream_test_next() conditions.</title>
<updated>2018-04-02T23:43:18+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-04-02T23:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d90a75b7cdc70ddb2aa1880dc09301c5f1a279ae'/>
<id>d90a75b7cdc70ddb2aa1880dc09301c5f1a279ae</id>
<content type='text'>
Previously, ngx_http_upstream_test_next() used an outdated condition on
whether it will be possible to switch to a different server or not.  It
did not take into account restrictions on non-idempotent requests, requests
with non-buffered request body, and the next upstream timeout.

For such requests, switching to the next upstream server was rejected
later in ngx_http_upstream_next(), resulting in nginx own error page
being returned instead of the original upstream response.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, ngx_http_upstream_test_next() used an outdated condition on
whether it will be possible to switch to a different server or not.  It
did not take into account restrictions on non-idempotent requests, requests
with non-buffered request body, and the next upstream timeout.

For such requests, switching to the next upstream server was rejected
later in ngx_http_upstream_next(), resulting in nginx own error page
being returned instead of the original upstream response.
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: fixed possible sign extension of error and setting_value.</title>
<updated>2018-03-22T16:26:25+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-03-22T16:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=0ac57648ebc93358e977939bfcb9d1e67485b98e'/>
<id>0ac57648ebc93358e977939bfcb9d1e67485b98e</id>
<content type='text'>
All cases are harmless and should not happen on valid values, though can
result in bad values being shown incorrectly in logs.

Found by Coverity (CID 1430311, 1430312, 1430313).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All cases are harmless and should not happen on valid values, though can
result in bad values being shown incorrectly in logs.

Found by Coverity (CID 1430311, 1430312, 1430313).
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: fixed missing state save in frame header parsing.</title>
<updated>2018-03-20T12:58:11+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2018-03-20T12:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e232421266416ed841272847ea307e935852230d'/>
<id>e232421266416ed841272847ea307e935852230d</id>
<content type='text'>
Previously, frame state wasn't saved if HEADERS frame payload
that begins with header fragment was not received at once.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, frame state wasn't saved if HEADERS frame payload
that begins with header fragment was not received at once.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: improved frame info debugging.</title>
<updated>2018-03-19T18:32:15+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-03-19T18:32:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=74ea120f7d7445f0874add2c4f40f13de3bd5723'/>
<id>74ea120f7d7445f0874add2c4f40f13de3bd5723</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: fixed parsing response headers split on CONTINUATION frames.</title>
<updated>2018-03-19T13:42:56+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2018-03-19T13:42:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f3ad346952e90c4d5dc34b5da924f1a57deb5165'/>
<id>f3ad346952e90c4d5dc34b5da924f1a57deb5165</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.</title>
<updated>2018-03-19T13:28:23+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-03-19T13:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c09aa142d64c6795a6bed8603a336285e7d3543d'/>
<id>c09aa142d64c6795a6bed8603a336285e7d3543d</id>
<content type='text'>
No functional changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed comments after 13f8dec720b5.</title>
<updated>2018-03-19T13:22:09+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-03-19T13:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=510986b80683e6d44e0e431ae92423eb7be64351'/>
<id>510986b80683e6d44e0e431ae92423eb7be64351</id>
<content type='text'>
The fields "uri", "location", and "url" from ngx_http_upstream_conf_t
moved to ngx_http_proxy_loc_conf_t and ngx_http_proxy_vars_t, reflect
this change in create_loc_conf comments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fields "uri", "location", and "url" from ngx_http_upstream_conf_t
moved to ngx_http_proxy_loc_conf_t and ngx_http_proxy_vars_t, reflect
this change in create_loc_conf comments.
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: special handling of "trailer only" responses.</title>
<updated>2018-03-17T20:04:26+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-03-17T20:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=6559a420134b0f52ce2d4f147bdd92269ad5f677'/>
<id>6559a420134b0f52ce2d4f147bdd92269ad5f677</id>
<content type='text'>
The gRPC protocol makes a distinction between HEADERS frame with
the END_STREAM flag set, and a HEADERS frame followed by an empty
DATA frame with the END_STREAM flag.  The latter is not permitted,
and results in errors not being propagated through nginx.  Instead,
gRPC clients complain that "server closed the stream without sending
trailers" (seen in grpc-go) or "13: Received RST_STREAM with error
code 2" (seen in grpc-c).

To fix this, nginx now returns HEADERS with the END_STREAM flag if
the response length is known to be 0, and we are not expecting
any trailer headers to be added.  And the response length is
explicitly set to 0 in the gRPC proxy if we see initial HEADERS frame
with the END_STREAM flag set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The gRPC protocol makes a distinction between HEADERS frame with
the END_STREAM flag set, and a HEADERS frame followed by an empty
DATA frame with the END_STREAM flag.  The latter is not permitted,
and results in errors not being propagated through nginx.  Instead,
gRPC clients complain that "server closed the stream without sending
trailers" (seen in grpc-go) or "13: Received RST_STREAM with error
code 2" (seen in grpc-c).

To fix this, nginx now returns HEADERS with the END_STREAM flag if
the response length is known to be 0, and we are not expecting
any trailer headers to be added.  And the response length is
explicitly set to 0 in the gRPC proxy if we see initial HEADERS frame
with the END_STREAM flag set.
</pre>
</div>
</content>
</entry>
<entry>
<title>gRPC: special handling of the TE request header.</title>
<updated>2018-03-17T20:04:25+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-03-17T20:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=6a0d9e5b2d9274e5ac5059a674763f19c2731b11'/>
<id>6a0d9e5b2d9274e5ac5059a674763f19c2731b11</id>
<content type='text'>
According to the gRPC protocol specification, the "TE" header is used
to detect incompatible proxies, and at least grpc-c server rejects
requests without "TE: trailers".

To preserve the logic, we have to pass "TE: trailers" to the backend if
and only if the original request contains "trailers" in the "TE" header.
Note that no other TE values are allowed in HTTP/2, so we have to remove
anything else.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the gRPC protocol specification, the "TE" header is used
to detect incompatible proxies, and at least grpc-c server rejects
requests without "TE: trailers".

To preserve the logic, we have to pass "TE: trailers" to the backend if
and only if the original request contains "trailers" in the "TE" header.
Note that no other TE values are allowed in HTTP/2, so we have to remove
anything else.
</pre>
</div>
</content>
</entry>
</feed>
