Mercurial > hg > nginx
comparison src/http/modules/proxy/ngx_http_proxy_handler.h @ 290:87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 16 Mar 2004 07:10:12 +0000 |
parents | f81d075ad172 |
children | a472bfb778b3 |
comparison
equal
deleted
inserted
replaced
289:0750faf8d7e3 | 290:87e73f067470 |
---|---|
38 ngx_str_t host; | 38 ngx_str_t host; |
39 ngx_str_t uri; | 39 ngx_str_t uri; |
40 ngx_str_t host_header; | 40 ngx_str_t host_header; |
41 ngx_str_t port_text; | 41 ngx_str_t port_text; |
42 ngx_str_t *location; | 42 ngx_str_t *location; |
43 int port; | 43 |
44 ngx_int_t port; | |
45 | |
44 unsigned default_port:1; | 46 unsigned default_port:1; |
45 } ngx_http_proxy_upstream_conf_t; | 47 } ngx_http_proxy_upstream_conf_t; |
46 | 48 |
47 | 49 |
48 typedef struct { | 50 typedef struct { |
49 ssize_t request_buffer_size; | 51 size_t request_buffer_size; |
52 size_t header_buffer_size; | |
53 size_t busy_buffers_size; | |
54 size_t max_temp_file_size; | |
55 size_t temp_file_write_size; | |
56 | |
50 ngx_msec_t connect_timeout; | 57 ngx_msec_t connect_timeout; |
51 ngx_msec_t send_timeout; | 58 ngx_msec_t send_timeout; |
52 ssize_t header_buffer_size; | |
53 ngx_msec_t read_timeout; | 59 ngx_msec_t read_timeout; |
60 time_t default_expires; | |
61 | |
62 ngx_int_t lm_factor; | |
63 | |
64 ngx_uint_t next_upstream; | |
65 ngx_uint_t use_stale; | |
54 | 66 |
55 ngx_bufs_t bufs; | 67 ngx_bufs_t bufs; |
56 ssize_t busy_buffers_size; | 68 |
57 | |
58 ssize_t max_temp_file_size; | |
59 ssize_t temp_file_write_size; | |
60 ngx_flag_t cyclic_temp_file; | 69 ngx_flag_t cyclic_temp_file; |
61 | |
62 ngx_flag_t cache; | 70 ngx_flag_t cache; |
63 | |
64 ngx_flag_t preserve_host; | 71 ngx_flag_t preserve_host; |
65 ngx_flag_t set_x_real_ip; | 72 ngx_flag_t set_x_real_ip; |
66 ngx_flag_t add_x_forwarded_for; | 73 ngx_flag_t add_x_forwarded_for; |
67 | |
68 ngx_flag_t pass_server; | 74 ngx_flag_t pass_server; |
69 ngx_flag_t pass_x_accel_expires; | 75 ngx_flag_t pass_x_accel_expires; |
70 | |
71 ngx_flag_t ignore_expires; | 76 ngx_flag_t ignore_expires; |
72 int lm_factor; | |
73 time_t default_expires; | |
74 | |
75 u_int next_upstream; | |
76 u_int use_stale; | |
77 | 77 |
78 ngx_path_t *cache_path; | 78 ngx_path_t *cache_path; |
79 ngx_path_t *temp_path; | 79 ngx_path_t *temp_path; |
80 | 80 |
81 ngx_http_busy_lock_t *busy_lock; | 81 ngx_http_busy_lock_t *busy_lock; |
94 | 94 |
95 typedef struct { | 95 typedef struct { |
96 ngx_http_proxy_state_e cache_state; | 96 ngx_http_proxy_state_e cache_state; |
97 time_t expired; | 97 time_t expired; |
98 time_t bl_time; | 98 time_t bl_time; |
99 int bl_state; | 99 ngx_uint_t bl_state; |
100 | 100 |
101 int status; | 101 ngx_uint_t status; |
102 ngx_http_proxy_reason_e reason; | 102 ngx_http_proxy_reason_e reason; |
103 time_t time; | 103 time_t time; |
104 time_t expires; | 104 time_t expires; |
105 | 105 |
106 ngx_str_t *peer; | 106 ngx_str_t *peer; |
128 } ngx_http_proxy_headers_in_t; | 128 } ngx_http_proxy_headers_in_t; |
129 | 129 |
130 | 130 |
131 typedef struct { | 131 typedef struct { |
132 ngx_http_cache_ctx_t ctx; | 132 ngx_http_cache_ctx_t ctx; |
133 int status; | 133 ngx_uint_t status; |
134 ngx_str_t status_line; | 134 ngx_str_t status_line; |
135 | 135 |
136 ngx_http_proxy_headers_in_t headers_in; | 136 ngx_http_proxy_headers_in_t headers_in; |
137 } ngx_http_proxy_cache_t; | 137 } ngx_http_proxy_cache_t; |
138 | 138 |
139 | 139 |
140 typedef struct { | 140 typedef struct { |
141 ngx_peer_connection_t peer; | 141 ngx_peer_connection_t peer; |
142 int status; | 142 ngx_uint_t status; |
143 ngx_str_t status_line; | 143 ngx_str_t status_line; |
144 int method; | 144 ngx_uint_t method; |
145 | 145 |
146 ngx_output_chain_ctx_t *output_chain_ctx; | 146 ngx_output_chain_ctx_t *output_chain_ctx; |
147 ngx_event_pipe_t *event_pipe; | 147 ngx_event_pipe_t *event_pipe; |
148 | 148 |
149 ngx_http_proxy_headers_in_t headers_in; | 149 ngx_http_proxy_headers_in_t headers_in; |
173 unsigned request_sent:1; | 173 unsigned request_sent:1; |
174 unsigned header_sent:1; | 174 unsigned header_sent:1; |
175 | 175 |
176 | 176 |
177 /* used to parse an upstream HTTP header */ | 177 /* used to parse an upstream HTTP header */ |
178 int status; | 178 ngx_uint_t status; |
179 char *status_start; | 179 u_char *status_start; |
180 char *status_end; | 180 u_char *status_end; |
181 int status_count; | 181 ngx_uint_t status_count; |
182 int parse_state; | 182 ngx_uint_t parse_state; |
183 | 183 |
184 ngx_http_proxy_state_t *state; | 184 ngx_http_proxy_state_t *state; |
185 ngx_array_t states; /* of ngx_http_proxy_state_t */ | 185 ngx_array_t states; /* of ngx_http_proxy_state_t */ |
186 | 186 |
187 char *action; | 187 u_char *action; |
188 ngx_http_log_ctx_t *saved_ctx; | 188 ngx_http_log_ctx_t *saved_ctx; |
189 ngx_log_handler_pt saved_handler; | 189 ngx_log_handler_pt saved_handler; |
190 }; | 190 }; |
191 | 191 |
192 | 192 |
193 typedef struct { | 193 typedef struct { |
194 u_int connection; | 194 ngx_uint_t connection; |
195 ngx_http_proxy_ctx_t *proxy; | 195 ngx_http_proxy_ctx_t *proxy; |
196 } ngx_http_proxy_log_ctx_t; | 196 } ngx_http_proxy_log_ctx_t; |
197 | 197 |
198 | 198 |
199 #define NGX_HTTP_PROXY_PARSE_NO_HEADER 20 | 199 #define NGX_HTTP_PROXY_PARSE_NO_HEADER 20 |