comparison src/http/ngx_http_upstream.h @ 665:0b460e61bdcd default tip

Merge with nginx 1.0.0.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:22:17 +0400
parents 428c6e58046a
children
comparison
equal deleted inserted replaced
572:06419a2298a9 665:0b460e61bdcd
41 41
42 #define NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT 0x00000002 42 #define NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT 0x00000002
43 #define NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES 0x00000004 43 #define NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES 0x00000004
44 #define NGX_HTTP_UPSTREAM_IGN_EXPIRES 0x00000008 44 #define NGX_HTTP_UPSTREAM_IGN_EXPIRES 0x00000008
45 #define NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL 0x00000010 45 #define NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL 0x00000010
46 #define NGX_HTTP_UPSTREAM_IGN_SET_COOKIE 0x00000020
46 47
47 48
48 typedef struct { 49 typedef struct {
49 ngx_msec_t bl_time; 50 ngx_msec_t bl_time;
50 ngx_uint_t bl_state; 51 ngx_uint_t bl_state;
51 52
52 ngx_uint_t status; 53 ngx_uint_t status;
53 time_t response_sec; 54 time_t response_sec;
54 ngx_uint_t response_msec; 55 ngx_uint_t response_msec;
55 off_t response_length; 56 off_t response_length;
56 57
57 ngx_str_t *peer; 58 ngx_str_t *peer;
58 } ngx_http_upstream_state_t; 59 } ngx_http_upstream_state_t;
59 60
60 61
78 void *data; 79 void *data;
79 } ngx_http_upstream_peer_t; 80 } ngx_http_upstream_peer_t;
80 81
81 82
82 typedef struct { 83 typedef struct {
83 ngx_peer_addr_t *addrs; 84 ngx_addr_t *addrs;
84 ngx_uint_t naddrs; 85 ngx_uint_t naddrs;
85 ngx_uint_t weight; 86 ngx_uint_t weight;
86 ngx_uint_t max_fails; 87 ngx_uint_t max_fails;
87 time_t fail_timeout; 88 time_t fail_timeout;
88 89
150 151
151 ngx_hash_t hide_headers_hash; 152 ngx_hash_t hide_headers_hash;
152 ngx_array_t *hide_headers; 153 ngx_array_t *hide_headers;
153 ngx_array_t *pass_headers; 154 ngx_array_t *pass_headers;
154 155
156 ngx_addr_t *local;
157
155 #if (NGX_HTTP_CACHE) 158 #if (NGX_HTTP_CACHE)
156 ngx_shm_zone_t *cache; 159 ngx_shm_zone_t *cache;
157 160
158 ngx_uint_t cache_min_uses; 161 ngx_uint_t cache_min_uses;
159 ngx_uint_t cache_use_stale; 162 ngx_uint_t cache_use_stale;
160 ngx_uint_t cache_methods; 163 ngx_uint_t cache_methods;
161 164
162 ngx_array_t *cache_valid; 165 ngx_array_t *cache_valid;
166 ngx_array_t *cache_bypass;
167 ngx_array_t *no_cache;
163 #endif 168 #endif
164 169
165 ngx_array_t *store_lengths; 170 ngx_array_t *store_lengths;
166 ngx_array_t *store_values; 171 ngx_array_t *store_values;
167 172
319 324
320 ngx_int_t ngx_http_upstream_create(ngx_http_request_t *r); 325 ngx_int_t ngx_http_upstream_create(ngx_http_request_t *r);
321 void ngx_http_upstream_init(ngx_http_request_t *r); 326 void ngx_http_upstream_init(ngx_http_request_t *r);
322 ngx_http_upstream_srv_conf_t *ngx_http_upstream_add(ngx_conf_t *cf, 327 ngx_http_upstream_srv_conf_t *ngx_http_upstream_add(ngx_conf_t *cf,
323 ngx_url_t *u, ngx_uint_t flags); 328 ngx_url_t *u, ngx_uint_t flags);
329 char *ngx_http_upstream_bind_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,
330 void *conf);
324 ngx_int_t ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf, 331 ngx_int_t ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
325 ngx_http_upstream_conf_t *conf, ngx_http_upstream_conf_t *prev, 332 ngx_http_upstream_conf_t *conf, ngx_http_upstream_conf_t *prev,
326 ngx_str_t *default_hide_headers, ngx_hash_init_t *hash); 333 ngx_str_t *default_hide_headers, ngx_hash_init_t *hash);
327 334
328 335
330 uscf->srv_conf[module.ctx_index] 337 uscf->srv_conf[module.ctx_index]
331 338
332 339
333 extern ngx_module_t ngx_http_upstream_module; 340 extern ngx_module_t ngx_http_upstream_module;
334 extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[]; 341 extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[];
335 342 extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[];
336 343
337 344
338 #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */ 345 #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */