HTTP: avoid define-dependent fields in ngx_http_request_t. Having those breaks binary compatibility between core HTTP modules and optional HTTP modules that have either of those values defined. Note that core defines (NGX_PCRE, NGX_STAT_STUB, NGX_HTTP_CACHE, NGX_HTTP_GZIP, NGX_HTTP_SSL and NGX_HTTP_V2) are left untouched. Change-Id: Ifceccfa0353c89f0de4d05ab9dab76e2e0ae2579 Signed-off-by: Piotr Sikora <piotrsikora@google.com> Reviewed-on: https://nginx-review.googlesource.com/1008 Reviewed-by: Martin Maly <mmaly@google.com>
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index ab7c15f..394694a 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c
@@ -149,19 +149,19 @@ { ngx_string("Keep-Alive"), offsetof(ngx_http_headers_in_t, keep_alive), ngx_http_process_header_line }, -#if (NGX_HTTP_X_FORWARDED_FOR) +#if 1 { ngx_string("X-Forwarded-For"), offsetof(ngx_http_headers_in_t, x_forwarded_for), ngx_http_process_multi_header_lines }, #endif -#if (NGX_HTTP_REALIP) +#if 1 { ngx_string("X-Real-IP"), offsetof(ngx_http_headers_in_t, x_real_ip), ngx_http_process_header_line }, #endif -#if (NGX_HTTP_HEADERS) +#if 1 { ngx_string("Accept"), offsetof(ngx_http_headers_in_t, accept), ngx_http_process_header_line }, @@ -170,7 +170,7 @@ ngx_http_process_header_line }, #endif -#if (NGX_HTTP_DAV) +#if 1 { ngx_string("Depth"), offsetof(ngx_http_headers_in_t, depth), ngx_http_process_header_line },
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 967032a..8ecadd8 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h
@@ -200,20 +200,20 @@ ngx_table_elt_t *keep_alive; -#if (NGX_HTTP_X_FORWARDED_FOR) +#if 1 ngx_array_t x_forwarded_for; #endif -#if (NGX_HTTP_REALIP) +#if 1 ngx_table_elt_t *x_real_ip; #endif -#if (NGX_HTTP_HEADERS) +#if 1 ngx_table_elt_t *accept; ngx_table_elt_t *accept_language; #endif -#if (NGX_HTTP_DAV) +#if 1 ngx_table_elt_t *depth; ngx_table_elt_t *destination; ngx_table_elt_t *overwrite;