ports/www/nginx-devel/files/extra-patch-ngx_http_echo_request_info.c
Sergey A. Osokin c77f4151e5 Upgrade from 1.11.10 to 1.12.0.
ChangeLog:	http://nginx.org/en/CHANGES-1.12

Also, remove third-party modules:
o) udplog
o) statsd

Upgrade third-party modules:
o) lua to 0.10.8
o) upstream_fair to b5be36f (upstream has been changed)

Please see this comment in case of the production use of the lua module:
https://github.com/openresty/lua-nginx-module/pull/1017#issuecomment-294076002

Patches obtained from:
o) 0459a285ca
o) d19df15904
2017-04-15 15:55:19 +00:00

43 lines
1.3 KiB
C

--- ../echo-nginx-module-46334b3/src/ngx_http_echo_request_info.c.orig 2017-04-15 10:03:29.616243000 -0400
+++ ../echo-nginx-module-46334b3/src/ngx_http_echo_request_info.c 2017-04-15 10:07:41.329695000 -0400
@@ -179,6 +179,9 @@
ngx_int_t i, j;
ngx_buf_t *b, *first = NULL;
unsigned found;
+#if defined(nginx_version) && nginx_version >= 1011011
+ ngx_chain_t *cl;
+#endif
ngx_connection_t *c;
ngx_http_request_t *mr;
ngx_http_connection_t *hc;
@@ -215,8 +218,15 @@
if (hc->nbusy) {
b = NULL;
+
+#if defined(nginx_version) && nginx_version >= 1011011
+ for (cl = hc->busy; cl; /* void */) {
+ b = cl->buf;
+ cl = cl->next;
+#else
for (i = 0; i < hc->nbusy; i++) {
b = hc->busy[i];
+#endif
if (first == NULL) {
if (mr->request_line.data >= b->pos
@@ -280,8 +290,14 @@
}
if (hc->nbusy) {
+#if defined(nginx_version) && nginx_version >= 1011011
+ for (cl = hc->busy; cl; /* void */) {
+ b = cl->buf;
+ cl = cl->next;
+#else
for (i = 0; i < hc->nbusy; i++) {
b = hc->busy[i];
+#endif
if (!found) {
if (b != first) {