Mercurial > hg > nginx
comparison src/http/ngx_http.h @ 24:77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 10 Dec 2002 18:05:12 +0000 |
parents | a649c0a0adb3 |
children | 53cb81681040 |
comparison
equal
deleted
inserted
replaced
23:f540a63026c9 | 24:77c7629a2627 |
---|---|
10 #include <ngx_files.h> | 10 #include <ngx_files.h> |
11 #include <ngx_connection.h> | 11 #include <ngx_connection.h> |
12 #include <ngx_config_command.h> | 12 #include <ngx_config_command.h> |
13 | 13 |
14 | 14 |
15 #define NGX_HTTP_VERSION_10 1000 | |
16 | |
15 #define NGX_HTTP_GET 1 | 17 #define NGX_HTTP_GET 1 |
16 #define NGX_HTTP_HEAD 2 | 18 #define NGX_HTTP_HEAD 2 |
17 #define NGX_HTTP_POST 3 | 19 #define NGX_HTTP_POST 3 |
18 | 20 |
19 #define NGX_HTTP_CONN_CLOSE 0 | 21 #define NGX_HTTP_CONN_CLOSE 0 |
71 | 73 |
72 ngx_table_t *headers; | 74 ngx_table_t *headers; |
73 } ngx_http_headers_in_t; | 75 } ngx_http_headers_in_t; |
74 | 76 |
75 typedef struct { | 77 typedef struct { |
76 int status; | 78 int status; |
77 int connection; | 79 ngx_str_t status_line; |
78 off_t content_length; | 80 |
79 char *location; | 81 ngx_table_elt_t *server; |
80 char *content_type; | 82 ngx_table_elt_t *date; |
81 char *charset; | 83 ngx_table_elt_t *content_type; |
82 char *etag; | 84 ngx_table_elt_t *location; |
83 char *server; | 85 ngx_table_elt_t *last_modified; |
84 time_t date; | 86 |
85 time_t last_modified; | 87 ngx_table_t *headers; |
88 | |
89 off_t content_length; | |
90 char *charset; | |
91 char *etag; | |
92 time_t date_time; | |
93 time_t last_modified_time; | |
86 } ngx_http_headers_out_t; | 94 } ngx_http_headers_out_t; |
87 | 95 |
88 typedef struct ngx_http_request_s ngx_http_request_t; | 96 typedef struct ngx_http_request_s ngx_http_request_t; |
89 | 97 |
90 struct ngx_http_request_s { | 98 struct ngx_http_request_s { |
91 char *filename; | 99 ngx_str_t filename; |
92 char *location; | 100 |
93 ngx_fd_t fd; | 101 ngx_fd_t fd; |
94 | 102 |
95 void **ctx; | 103 void **ctx; |
96 void **loc_conf; | 104 void **loc_conf; |
97 void **srv_conf; | 105 void **srv_conf; |
114 int http_version; | 122 int http_version; |
115 int http_major; | 123 int http_major; |
116 int http_minor; | 124 int http_minor; |
117 | 125 |
118 ngx_str_t request_line; | 126 ngx_str_t request_line; |
119 char *uri; | 127 ngx_str_t uri; |
120 char *exten; | 128 ngx_str_t exten; |
121 ngx_http_request_t *main; | 129 ngx_http_request_t *main; |
122 | 130 |
123 ngx_connection_t *connection; | 131 ngx_connection_t *connection; |
124 ngx_http_server_t *server; | 132 ngx_http_server_t *server; |
125 | 133 |
130 | 138 |
131 unsigned keepalive:1; | 139 unsigned keepalive:1; |
132 unsigned lingering_close:1; | 140 unsigned lingering_close:1; |
133 | 141 |
134 unsigned header_read:1; | 142 unsigned header_read:1; |
135 unsigned process_header:1; | |
136 unsigned header_timeout:1; | 143 unsigned header_timeout:1; |
137 | 144 |
138 unsigned logging:1; | 145 unsigned logging:1; |
139 | 146 |
140 unsigned header_only:1; | 147 unsigned header_only:1; |
163 } ngx_http_log_ctx_t; | 170 } ngx_http_log_ctx_t; |
164 | 171 |
165 | 172 |
166 typedef struct { | 173 typedef struct { |
167 int index; | 174 int index; |
175 | |
168 void *(*create_srv_conf)(ngx_pool_t *p); | 176 void *(*create_srv_conf)(ngx_pool_t *p); |
169 void *(*create_loc_conf)(ngx_pool_t *p); | 177 void *(*create_loc_conf)(ngx_pool_t *p); |
170 ngx_command_t *commands; | 178 ngx_command_t *commands; |
179 | |
171 int (*init_module)(ngx_pool_t *p); | 180 int (*init_module)(ngx_pool_t *p); |
181 | |
182 int (*translate_handler)(ngx_http_request_t *r); | |
183 | |
172 int (*init_output_body_filter)(int (**next_filter) | 184 int (*init_output_body_filter)(int (**next_filter) |
173 (ngx_http_request_t *r, ngx_chain_t *ch)); | 185 (ngx_http_request_t *r, ngx_chain_t *ch)); |
174 } ngx_http_module_t; | 186 } ngx_http_module_t; |
175 | 187 |
176 #define NGX_HTTP_MODULE 0 | 188 #define NGX_HTTP_MODULE 0 |