Mercurial > hg > nginx-mail
comparison src/http/ngx_http.h @ 0:f0b350454894 NGINX_0_1_0
nginx 0.1.0
*) The first public version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Oct 2004 00:00:00 +0400 |
parents | |
children | 46833bd150cb |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0b350454894 |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_HTTP_H_INCLUDED_ | |
8 #define _NGX_HTTP_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 #include <ngx_garbage_collector.h> | |
14 | |
15 typedef struct ngx_http_request_s ngx_http_request_t; | |
16 typedef struct ngx_http_cleanup_s ngx_http_cleanup_t; | |
17 | |
18 #if (NGX_HTTP_CACHE) | |
19 #include <ngx_http_cache.h> | |
20 #endif | |
21 /* STUB */ | |
22 #include <ngx_http_cache.h> | |
23 | |
24 #include <ngx_http_request.h> | |
25 #include <ngx_http_config.h> | |
26 #include <ngx_http_busy_lock.h> | |
27 #include <ngx_http_log_handler.h> | |
28 #include <ngx_http_core_module.h> | |
29 | |
30 #if (NGX_HTTP_SSL) | |
31 #include <ngx_http_ssl_module.h> | |
32 #endif | |
33 | |
34 | |
35 typedef struct { | |
36 u_int connection; | |
37 | |
38 /* | |
39 * we declare "action" as "char *" because the actions are usually | |
40 * the static strings and in the "u_char *" case we have to override | |
41 * all the time their types | |
42 */ | |
43 | |
44 char *action; | |
45 u_char *client; | |
46 u_char *url; | |
47 } ngx_http_log_ctx_t; | |
48 | |
49 | |
50 #define ngx_http_get_module_ctx(r, module) r->ctx[module.ctx_index] | |
51 #define ngx_http_get_module_err_ctx(r, module) \ | |
52 (r->err_ctx ? r->err_ctx[module.ctx_index] : r->ctx[module.ctx_index]) | |
53 | |
54 #define ngx_http_create_ctx(r, cx, module, size, error) \ | |
55 do { \ | |
56 ngx_test_null(cx, ngx_pcalloc(r->pool, size), error); \ | |
57 r->ctx[module.ctx_index] = cx; \ | |
58 } while (0) | |
59 | |
60 #define ngx_http_delete_ctx(r, module) \ | |
61 r->ctx[module.ctx_index] = NULL; | |
62 | |
63 | |
64 void ngx_http_init_connection(ngx_connection_t *c); | |
65 | |
66 ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b); | |
67 ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r); | |
68 ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b); | |
69 | |
70 ngx_int_t ngx_http_find_server_conf(ngx_http_request_t *r); | |
71 void ngx_http_handler(ngx_http_request_t *r); | |
72 void ngx_http_finalize_request(ngx_http_request_t *r, int error); | |
73 void ngx_http_writer(ngx_event_t *wev); | |
74 | |
75 void ngx_http_empty_handler(ngx_event_t *wev); | |
76 | |
77 ngx_int_t ngx_http_send_last(ngx_http_request_t *r); | |
78 void ngx_http_close_request(ngx_http_request_t *r, int error); | |
79 void ngx_http_close_connection(ngx_connection_t *c); | |
80 | |
81 | |
82 ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r); | |
83 | |
84 ngx_int_t ngx_http_send_header(ngx_http_request_t *r); | |
85 ngx_int_t ngx_http_special_response_handler(ngx_http_request_t *r, int error); | |
86 | |
87 | |
88 time_t ngx_http_parse_time(u_char *value, size_t len); | |
89 size_t ngx_http_get_time(char *buf, time_t t); | |
90 | |
91 | |
92 | |
93 ngx_int_t ngx_http_discard_body(ngx_http_request_t *r); | |
94 | |
95 | |
96 extern ngx_module_t ngx_http_module; | |
97 | |
98 | |
99 extern ngx_uint_t ngx_http_total_requests; | |
100 extern uint64_t ngx_http_total_sent; | |
101 | |
102 | |
103 extern ngx_http_output_header_filter_pt ngx_http_top_header_filter; | |
104 extern ngx_http_output_body_filter_pt ngx_http_top_body_filter; | |
105 | |
106 | |
107 /* STUB */ | |
108 ngx_int_t ngx_http_log_handler(ngx_http_request_t *r); | |
109 /**/ | |
110 | |
111 | |
112 #endif /* _NGX_HTTP_H_INCLUDED_ */ |