comparison src/http/ngx_http_request.h @ 4732:613390a974df stable-1.2

Merge of r4698: X-Forwarded-For conditionals. Fixed compile-time conditionals used to detect if X-Forwarded-For support is needed. Note: compatibility shims were added during merge to avoid possible breakage of 3rd party modules. At least cache purge module was broken by the original commit, as it used to rely on NGX_HTTP_PROXY define.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 02 Jul 2012 17:41:52 +0000
parents cb1d3b48a848
children
comparison
equal deleted inserted replaced
4731:9efa21520c84 4732:613390a974df
135 #define NGX_HTTP_SSI_BUFFERED 0x01 135 #define NGX_HTTP_SSI_BUFFERED 0x01
136 #define NGX_HTTP_SUB_BUFFERED 0x02 136 #define NGX_HTTP_SUB_BUFFERED 0x02
137 #define NGX_HTTP_COPY_BUFFERED 0x04 137 #define NGX_HTTP_COPY_BUFFERED 0x04
138 138
139 139
140 #if (NGX_HTTP_PROXY || NGX_HTTP_REALIP || NGX_HTTP_GEO)
141 #ifndef NGX_HTTP_X_FORWARDED_FOR
142 #define NGX_HTTP_X_FORWARDED_FOR 1
143 #endif
144 #endif
145
146
140 typedef enum { 147 typedef enum {
141 NGX_HTTP_INITING_REQUEST_STATE = 0, 148 NGX_HTTP_INITING_REQUEST_STATE = 0,
142 NGX_HTTP_READING_REQUEST_STATE, 149 NGX_HTTP_READING_REQUEST_STATE,
143 NGX_HTTP_PROCESS_REQUEST_STATE, 150 NGX_HTTP_PROCESS_REQUEST_STATE,
144 151
190 197
191 ngx_table_elt_t *authorization; 198 ngx_table_elt_t *authorization;
192 199
193 ngx_table_elt_t *keep_alive; 200 ngx_table_elt_t *keep_alive;
194 201
195 #if (NGX_HTTP_PROXY || NGX_HTTP_REALIP || NGX_HTTP_GEO) 202 #if (NGX_HTTP_X_FORWARDED_FOR)
196 ngx_table_elt_t *x_forwarded_for; 203 ngx_table_elt_t *x_forwarded_for;
197 #endif 204 #endif
198 205
199 #if (NGX_HTTP_REALIP) 206 #if (NGX_HTTP_REALIP)
200 ngx_table_elt_t *x_real_ip; 207 ngx_table_elt_t *x_real_ip;