<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http/modules/ngx_http_realip_module.c, branch release-1.28.3</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Reworked multi headers to use linked lists.</title>
<updated>2022-05-30T18:25:33+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2022-05-30T18:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3aef1d693f3cc431563a7e6a6aba6a34e5290f03'/>
<id>3aef1d693f3cc431563a7e6a6aba6a34e5290f03</id>
<content type='text'>
Multi headers are now using linked lists instead of arrays.  Notably,
the following fields were changed: r-&gt;headers_in.cookies (renamed
to r-&gt;headers_in.cookie), r-&gt;headers_in.x_forwarded_for,
r-&gt;headers_out.cache_control, r-&gt;headers_out.link, u-&gt;headers_in.cache_control
u-&gt;headers_in.cookies (renamed to u-&gt;headers_in.set_cookie).

The r-&gt;headers_in.cookies and u-&gt;headers_in.cookies fields were renamed
to r-&gt;headers_in.cookie and u-&gt;headers_in.set_cookie to match header names.

The ngx_http_parse_multi_header_lines() and ngx_http_parse_set_cookie_lines()
functions were changed accordingly.

With this change, multi headers are now essentially equivalent to normal
headers, and following changes will further make them equivalent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multi headers are now using linked lists instead of arrays.  Notably,
the following fields were changed: r-&gt;headers_in.cookies (renamed
to r-&gt;headers_in.cookie), r-&gt;headers_in.x_forwarded_for,
r-&gt;headers_out.cache_control, r-&gt;headers_out.link, u-&gt;headers_in.cache_control
u-&gt;headers_in.cookies (renamed to u-&gt;headers_in.set_cookie).

The r-&gt;headers_in.cookies and u-&gt;headers_in.cookies fields were renamed
to r-&gt;headers_in.cookie and u-&gt;headers_in.set_cookie to match header names.

The ngx_http_parse_multi_header_lines() and ngx_http_parse_set_cookie_lines()
functions were changed accordingly.

With this change, multi headers are now essentially equivalent to normal
headers, and following changes will further make them equivalent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: moved PROXY protocol fields out of ngx_connection_t.</title>
<updated>2019-10-21T15:06:19+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2019-10-21T15:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=be932e81a1531a3ba032febad968fc2006c4fa48'/>
<id>be932e81a1531a3ba032febad968fc2006c4fa48</id>
<content type='text'>
Now a new structure ngx_proxy_protocol_t holds these fields.  This allows
to add more PROXY protocol fields in the future without modifying the
connection structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now a new structure ngx_proxy_protocol_t holds these fields.  This allows
to add more PROXY protocol fields in the future without modifying the
connection structure.
</pre>
</div>
</content>
</entry>
<entry>
<title>Variables: macros for null variables.</title>
<updated>2017-08-01T11:28:33+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2017-08-01T11:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b992f7259ba4763178f9d394b320bcc5de88818b'/>
<id>b992f7259ba4763178f9d394b320bcc5de88818b</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>Realip: allow hostnames in set_real_ip_from (ticket #1180).</title>
<updated>2017-05-15T14:17:01+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2017-05-15T14:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a464d07f0a3fd8afd37ce7135e7c678e3604a30c'/>
<id>a464d07f0a3fd8afd37ce7135e7c678e3604a30c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Realip: fixed duplicate processing on redirects (ticket #1098).</title>
<updated>2016-10-06T20:16:05+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2016-10-06T20:16:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=52892835ef16ea15a77e2407099e0de0dfcc8a28'/>
<id>52892835ef16ea15a77e2407099e0de0dfcc8a28</id>
<content type='text'>
Duplicate processing was possible if the address set by realip was
listed in set_realip_from, and there was an internal redirect so module
context was cleared.  This resulted in exactly the same address being set,
so this wasn't a problem before the $realip_remote_addr variable was
introduced, though now results in incorrect $realip_remote_addr being
picked.

Fix is to use ngx_http_realip_get_module_ctx() to look up module context
even if it was cleared.  Additionally, the order of checks was switched to
check the configuration first as it looks more effective.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Duplicate processing was possible if the address set by realip was
listed in set_realip_from, and there was an internal redirect so module
context was cleared.  This resulted in exactly the same address being set,
so this wasn't a problem before the $realip_remote_addr variable was
introduced, though now results in incorrect $realip_remote_addr being
picked.

Fix is to use ngx_http_realip_get_module_ctx() to look up module context
even if it was cleared.  Additionally, the order of checks was switched to
check the configuration first as it looks more effective.
</pre>
</div>
</content>
</entry>
<entry>
<title>Realip: fixed uninitialized memory access.</title>
<updated>2016-09-01T11:33:51+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2016-09-01T11:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c6ba4aae38af53a378a57fd196fe32ccb3b4131d'/>
<id>c6ba4aae38af53a378a57fd196fe32ccb3b4131d</id>
<content type='text'>
Previously, the realip module could be left with uninitialized context after an
error in the ngx_http_realip_set_addr() function.  That context could be later
accessed by $realip_remote_addr and $realip_remote_port variable handlers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the realip module could be left with uninitialized context after an
error in the ngx_http_realip_set_addr() function.  That context could be later
accessed by $realip_remote_addr and $realip_remote_port variable handlers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduced ngx_inet_get_port() and ngx_inet_set_port() functions.</title>
<updated>2016-06-20T08:50:39+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2016-06-20T08:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=5b201ac31f968d13f1165e7f29967e5826ccb9a1'/>
<id>5b201ac31f968d13f1165e7f29967e5826ccb9a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Realip: detect duplicate real_ip_header directive.</title>
<updated>2016-05-23T16:17:24+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-05-23T16:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=adfd0b065cca23d2ca61ad43c5b8fdaa23957da9'/>
<id>adfd0b065cca23d2ca61ad43c5b8fdaa23957da9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Realip: take client port from PROXY protocol header.</title>
<updated>2016-05-23T15:44:22+00:00</updated>
<author>
<name>Dmitry Volyntsev</name>
<email>xeioex@nginx.com</email>
</author>
<published>2016-05-23T15:44:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=19140c8c4f7f16747df4a7e3bf4299a6a8d75a81'/>
<id>19140c8c4f7f16747df4a7e3bf4299a6a8d75a81</id>
<content type='text'>
Previously, when the client address was changed to the one from
the PROXY protocol header, the client port ($remote_port) was
reset to zero.  Now the client port is also changed to the one
from the PROXY protocol header.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, when the client address was changed to the one from
the PROXY protocol header, the client port ($remote_port) was
reset to zero.  Now the client port is also changed to the one
from the PROXY protocol header.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added the $realip_remote_port variable.</title>
<updated>2016-05-23T15:44:22+00:00</updated>
<author>
<name>Dmitry Volyntsev</name>
<email>xeioex@nginx.com</email>
</author>
<published>2016-05-23T15:44:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=97495b662f378bad2a9df05d4c4b4e0977b1d309'/>
<id>97495b662f378bad2a9df05d4c4b4e0977b1d309</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
