<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.17.2</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Xslt: fixed potential buffer overflow with null character.</title>
<updated>2019-07-18T15:27:54+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-18T15:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=2187586207e1465d289ae64cedc829719a048a39'/>
<id>2187586207e1465d289ae64cedc829719a048a39</id>
<content type='text'>
Due to shortcomings of the ccv-&gt;zero flag implementation in complex value
interface, length of the resulting string from ngx_http_complex_value()
might either not include terminating null character or include it,
so the only safe way to work with the result is to use it as a
null-terminated string.

Reported by Patrick Wollgast.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to shortcomings of the ccv-&gt;zero flag implementation in complex value
interface, length of the resulting string from ngx_http_complex_value()
might either not include terminating null character or include it,
so the only safe way to work with the result is to use it as a
null-terminated string.

Reported by Patrick Wollgast.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSI: avoid potential buffer overflow.</title>
<updated>2019-07-18T15:27:53+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-18T15:27:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ad42d70fed67c1e7098055fb25721ab904db2389'/>
<id>ad42d70fed67c1e7098055fb25721ab904db2389</id>
<content type='text'>
When "-" follows a parameter of maximum length, a single byte buffer
overflow happens, since the error branch does not check parameter length.
Fix is to avoid saving "-" to the parameter key, and instead use an error
message with "-" explicitly written.  The message is mostly identical to
one used in similar cases in the preequal state.

Reported by Patrick Wollgast.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When "-" follows a parameter of maximum length, a single byte buffer
overflow happens, since the error branch does not check parameter length.
Fix is to avoid saving "-" to the parameter key, and instead use an error
message with "-" explicitly written.  The message is mostly identical to
one used in similar cases in the preequal state.

Reported by Patrick Wollgast.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed EOF handling in unbuffered and upgraded modes.</title>
<updated>2019-07-18T15:27:52+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-18T15:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=20c8c4fe35d290abe298cea9a4f1756fcfec19f4'/>
<id>20c8c4fe35d290abe298cea9a4f1756fcfec19f4</id>
<content type='text'>
With level-triggered event methods it is important to specify
the NGX_CLOSE_EVENT flag to ngx_handle_read_event(), otherwise
the event won't be removed, resulting in CPU hog.

Reported by Patrick Wollgast.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With level-triggered event methods it is important to specify
the NGX_CLOSE_EVENT flag to ngx_handle_read_event(), otherwise
the event won't be removed, resulting in CPU hog.

Reported by Patrick Wollgast.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: return error on output on closed stream.</title>
<updated>2019-07-18T15:27:50+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-18T15:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=36dfa020f256dfc5beed3366be099d99543ad5b2'/>
<id>36dfa020f256dfc5beed3366be099d99543ad5b2</id>
<content type='text'>
Without this, an (incorrect) output on a closed stream could result in
a socket leak.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this, an (incorrect) output on a closed stream could result in
a socket leak.
</pre>
</div>
</content>
</entry>
<entry>
<title>Perl: removed unused variable, forgotten in 975d7ab37b39.</title>
<updated>2019-07-17T14:00:57+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-17T14:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=676d1a0e947c8f39e2606997a3628ec6bdea177d'/>
<id>676d1a0e947c8f39e2606997a3628ec6bdea177d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Gzip: use zlib to write header and trailer.</title>
<updated>2019-07-12T10:43:08+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2019-07-12T10:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=cfa1316368dcc6dc1aa82e3d0b67ec0d1cf7eebb'/>
<id>cfa1316368dcc6dc1aa82e3d0b67ec0d1cf7eebb</id>
<content type='text'>
When nginx is used with zlib patched with [1], which provides
integration with the future IBM Z hardware deflate acceleration, it ends
up computing CRC32 twice: one time in hardware, which always does this,
and one time in software by explicitly calling crc32().

crc32() calls were added in changesets 133:b27548f540ad ("nginx-0.0.1-
2003-09-24-23:51:12 import") and 134:d57c6835225c ("nginx-0.0.1-
2003-09-26-09:45:21 import") as part of gzip wrapping feature - back
then zlib did not support it.

However, since then gzip wrapping was implemented in zlib v1.2.0.4,
and it's already being used by nginx for log compression.

This patch replaces hand-written gzip wrapping with the one provided by
zlib. It simplifies the code, and makes it avoid computing CRC32 twice
when using hardware acceleration.

[1] https://github.com/madler/zlib/pull/410
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When nginx is used with zlib patched with [1], which provides
integration with the future IBM Z hardware deflate acceleration, it ends
up computing CRC32 twice: one time in hardware, which always does this,
and one time in software by explicitly calling crc32().

crc32() calls were added in changesets 133:b27548f540ad ("nginx-0.0.1-
2003-09-24-23:51:12 import") and 134:d57c6835225c ("nginx-0.0.1-
2003-09-26-09:45:21 import") as part of gzip wrapping feature - back
then zlib did not support it.

However, since then gzip wrapping was implemented in zlib v1.2.0.4,
and it's already being used by nginx for log compression.

This patch replaces hand-written gzip wrapping with the one provided by
zlib. It simplifies the code, and makes it avoid computing CRC32 twice
when using hardware acceleration.

[1] https://github.com/madler/zlib/pull/410
</pre>
</div>
</content>
</entry>
<entry>
<title>Perl: named locations in $r-&gt;internal_redirect().</title>
<updated>2019-07-12T12:39:28+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-12T12:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=29fea7d9ec7b18d9f3c2e77bddd873dafbd10842'/>
<id>29fea7d9ec7b18d9f3c2e77bddd873dafbd10842</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Perl: expect escaped URIs in $r-&gt;internal_redirect().</title>
<updated>2019-07-12T12:39:26+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-12T12:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=8df08b02b89c151e4bf04bc3c7c9a37e9ebcba9d'/>
<id>8df08b02b89c151e4bf04bc3c7c9a37e9ebcba9d</id>
<content type='text'>
Similarly to the change in 5491:74bfa803a5aa (1.5.9), we should accept
properly escaped URIs and unescape them as needed, else it is not possible
to handle URIs with question marks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similarly to the change in 5491:74bfa803a5aa (1.5.9), we should accept
properly escaped URIs and unescape them as needed, else it is not possible
to handle URIs with question marks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Perl: additional ctx-&gt;header_sent checks.</title>
<updated>2019-07-12T12:39:25+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-12T12:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=9e883a2e48ff8e55fcfb091284b44d8fa66fc007'/>
<id>9e883a2e48ff8e55fcfb091284b44d8fa66fc007</id>
<content type='text'>
As we now have ctx-&gt;header_sent flag, it is further used to prevent
duplicate $r-&gt;send_http_header() calls, prevent output before sending
header, and $r-&gt;internal_redirect() after sending header.

Further, $r-&gt;send_http_header() protected from calls after
$r-&gt;internal_redirect().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As we now have ctx-&gt;header_sent flag, it is further used to prevent
duplicate $r-&gt;send_http_header() calls, prevent output before sending
header, and $r-&gt;internal_redirect() after sending header.

Further, $r-&gt;send_http_header() protected from calls after
$r-&gt;internal_redirect().
</pre>
</div>
</content>
</entry>
<entry>
<title>Perl: avoid returning 500 if header was already sent.</title>
<updated>2019-07-12T12:39:25+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2019-07-12T12:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=78b39bd631fc18fd5778090183776f5275005e21'/>
<id>78b39bd631fc18fd5778090183776f5275005e21</id>
<content type='text'>
Returning NGX_HTTP_INTERNAL_SERVER_ERROR if a perl code died after
sending header will lead to a "header already sent" alert.  To avoid
it, we now check if header was already sent, and return NGX_ERROR
instead if it was.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning NGX_HTTP_INTERNAL_SERVER_ERROR if a perl code died after
sending header will lead to a "header already sent" alert.  To avoid
it, we now check if header was already sent, and return NGX_ERROR
instead if it was.
</pre>
</div>
</content>
</entry>
</feed>
