Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.h @ 2268:33556140681a
*) ngx_http_upstream_test_next()
*) add proxy_next_upstream http_502 and http_504
*) fix http_503
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 30 Sep 2008 15:39:02 +0000 |
parents | 274c0f3ea600 |
children | c77f4710595c |
comparison
equal
deleted
inserted
replaced
2267:920be89a3d2d | 2268:33556140681a |
---|---|
18 | 18 |
19 #define NGX_HTTP_UPSTREAM_FT_ERROR 0x00000002 | 19 #define NGX_HTTP_UPSTREAM_FT_ERROR 0x00000002 |
20 #define NGX_HTTP_UPSTREAM_FT_TIMEOUT 0x00000004 | 20 #define NGX_HTTP_UPSTREAM_FT_TIMEOUT 0x00000004 |
21 #define NGX_HTTP_UPSTREAM_FT_INVALID_HEADER 0x00000008 | 21 #define NGX_HTTP_UPSTREAM_FT_INVALID_HEADER 0x00000008 |
22 #define NGX_HTTP_UPSTREAM_FT_HTTP_500 0x00000010 | 22 #define NGX_HTTP_UPSTREAM_FT_HTTP_500 0x00000010 |
23 #define NGX_HTTP_UPSTREAM_FT_HTTP_503 0x00000020 | 23 #define NGX_HTTP_UPSTREAM_FT_HTTP_502 0x00000020 |
24 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000040 | 24 #define NGX_HTTP_UPSTREAM_FT_HTTP_503 0x00000040 |
25 #define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00000080 | 25 #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080 |
26 #define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00000100 | 26 #define NGX_HTTP_UPSTREAM_FT_HTTP_404 0x00000100 |
27 #define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK 0x00000200 | |
28 #define NGX_HTTP_UPSTREAM_FT_MAX_WAITING 0x00000400 | |
27 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000 | 29 #define NGX_HTTP_UPSTREAM_FT_NOLIVE 0x40000000 |
28 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 | 30 #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 |
29 | 31 |
32 #define NGX_HTTP_UPSTREAM_FT_STATUS (NGX_HTTP_UPSTREAM_FT_HTTP_500 \ | |
33 |NGX_HTTP_UPSTREAM_FT_HTTP_502 \ | |
34 |NGX_HTTP_UPSTREAM_FT_HTTP_503 \ | |
35 |NGX_HTTP_UPSTREAM_FT_HTTP_504 \ | |
36 |NGX_HTTP_UPSTREAM_FT_HTTP_404) | |
30 | 37 |
31 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 | 38 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 |
32 | 39 |
33 | 40 |
34 typedef struct { | 41 typedef struct { |
265 unsigned request_sent:1; | 272 unsigned request_sent:1; |
266 unsigned header_sent:1; | 273 unsigned header_sent:1; |
267 }; | 274 }; |
268 | 275 |
269 | 276 |
277 typedef struct { | |
278 ngx_uint_t status; | |
279 ngx_uint_t mask; | |
280 } ngx_http_upstream_next_t; | |
281 | |
282 | |
270 ngx_int_t ngx_http_upstream_header_variable(ngx_http_request_t *r, | 283 ngx_int_t ngx_http_upstream_header_variable(ngx_http_request_t *r, |
271 ngx_http_variable_value_t *v, uintptr_t data); | 284 ngx_http_variable_value_t *v, uintptr_t data); |
272 | 285 |
273 void ngx_http_upstream_init(ngx_http_request_t *r); | 286 void ngx_http_upstream_init(ngx_http_request_t *r); |
274 ngx_http_upstream_srv_conf_t *ngx_http_upstream_add(ngx_conf_t *cf, | 287 ngx_http_upstream_srv_conf_t *ngx_http_upstream_add(ngx_conf_t *cf, |