Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 1162:f59d15404269
$upstream_http_... variables
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 10 Apr 2007 07:08:06 +0000 |
parents | c843f3df3b85 |
children | bde5e4134759 |
comparison
equal
deleted
inserted
replaced
1161:6002e0253221 | 1162:f59d15404269 |
---|---|
2606 | 2606 |
2607 return NGX_OK; | 2607 return NGX_OK; |
2608 } | 2608 } |
2609 | 2609 |
2610 | 2610 |
2611 ngx_int_t | |
2612 ngx_http_upstream_header_variable(ngx_http_request_t *r, | |
2613 ngx_http_variable_value_t *v, uintptr_t data) | |
2614 { | |
2615 if (r->upstream == NULL) { | |
2616 v->not_found = 1; | |
2617 return NGX_OK; | |
2618 } | |
2619 | |
2620 return ngx_http_variable_unknown_header(v, (ngx_str_t *) data, | |
2621 &r->upstream->headers_in.headers.part, | |
2622 sizeof("upstream_http_") - 1); | |
2623 } | |
2624 | |
2625 | |
2611 static char * | 2626 static char * |
2612 ngx_http_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) | 2627 ngx_http_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) |
2613 { | 2628 { |
2614 char *rv; | 2629 char *rv; |
2615 void *mconf; | 2630 void *mconf; |