comparison src/http/modules/proxy/ngx_http_proxy_handler.h @ 176:c0552e5ab567

nginx-0.0.1-2003-11-09-23:03:38 import; separate building
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Nov 2003 20:03:38 +0000
parents e92c2c647c57
children c966c09be66b
comparison
equal deleted inserted replaced
175:e92c2c647c57 176:c0552e5ab567
78 ngx_http_proxy_upstream_conf_t *upstream; 78 ngx_http_proxy_upstream_conf_t *upstream;
79 ngx_peers_t *peers; 79 ngx_peers_t *peers;
80 } ngx_http_proxy_loc_conf_t; 80 } ngx_http_proxy_loc_conf_t;
81 81
82 82
83 typedef struct { 83 /*
84 ngx_http_proxy_state_e cache; 84 * "EXPR/10/5/- 200/EXP/60 4"
85 * "MISS/-/-/B 503/-/- -"
86 * "EXPR/10/20/SB HIT/-/- -"
87 * "EXPR/10/15/NB HIT/-/- -"
88 */
89
90 typedef struct {
91 ngx_http_proxy_state_e cache_state;
92 time_t expired;
93 time_t bl_time;
94 int bl_state;
95
96 int status;
85 ngx_http_proxy_reason_e reason; 97 ngx_http_proxy_reason_e reason;
86 int status; 98 time_t time;
99 time_t expires;
100
87 ngx_str_t *peer; 101 ngx_str_t *peer;
88 } ngx_http_proxy_state_t; 102 } ngx_http_proxy_state_t;
89 103
90 104
91 typedef struct { 105 typedef struct {
138 ngx_http_proxy_upstream_t *upstream; 152 ngx_http_proxy_upstream_t *upstream;
139 ngx_http_proxy_cache_t *cache; 153 ngx_http_proxy_cache_t *cache;
140 154
141 ngx_hunk_t *header_in; 155 ngx_hunk_t *header_in;
142 156
143 time_t busy_lock_time; 157 ngx_http_busy_lock_ctx_t busy_lock;
144 158
145 unsigned accel:1; 159 unsigned accel:1;
146 160
147 unsigned cachable:1; 161 unsigned cachable:1;
148 unsigned stale:1; 162 unsigned stale:1;
163 unsigned try_busy_lock:1;
164 unsigned busy_locked:1;
149 unsigned valid_header_in:1; 165 unsigned valid_header_in:1;
150 166
151 unsigned request_sent:1; 167 unsigned request_sent:1;
152 unsigned header_sent:1; 168 unsigned header_sent:1;
153 169
185 int ngx_http_proxy_get_cached_response(ngx_http_proxy_ctx_t *p); 201 int ngx_http_proxy_get_cached_response(ngx_http_proxy_ctx_t *p);
186 int ngx_http_proxy_send_cached_response(ngx_http_proxy_ctx_t *p); 202 int ngx_http_proxy_send_cached_response(ngx_http_proxy_ctx_t *p);
187 int ngx_http_proxy_is_cachable(ngx_http_proxy_ctx_t *p); 203 int ngx_http_proxy_is_cachable(ngx_http_proxy_ctx_t *p);
188 int ngx_http_proxy_update_cache(ngx_http_proxy_ctx_t *p); 204 int ngx_http_proxy_update_cache(ngx_http_proxy_ctx_t *p);
189 205
206 void ngx_http_proxy_busy_lock_handler(ngx_event_t *rev);
207 void ngx_http_proxy_cache_busy_lock(ngx_http_proxy_ctx_t *p);
208 void ngx_http_proxy_upstream_busy_lock(ngx_http_proxy_ctx_t *p);
209
190 size_t ngx_http_proxy_log_error(void *data, char *buf, size_t len); 210 size_t ngx_http_proxy_log_error(void *data, char *buf, size_t len);
191 void ngx_http_proxy_finalize_request(ngx_http_proxy_ctx_t *p, int rc); 211 void ngx_http_proxy_finalize_request(ngx_http_proxy_ctx_t *p, int rc);
192 void ngx_http_proxy_close_connection(ngx_http_proxy_ctx_t *p); 212 void ngx_http_proxy_close_connection(ngx_http_proxy_ctx_t *p);
193 213
194 int ngx_http_proxy_parse_status_line(ngx_http_proxy_ctx_t *p); 214 int ngx_http_proxy_parse_status_line(ngx_http_proxy_ctx_t *p);