0
|
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;
|
28
|
16 typedef struct ngx_http_log_ctx_s ngx_http_log_ctx_t;
|
0
|
17 typedef struct ngx_http_cleanup_s ngx_http_cleanup_t;
|
26
|
18 typedef struct ngx_http_in_addr_s ngx_http_in_addr_t;
|
50
|
19 typedef struct ngx_http_variable_value_s ngx_http_variable_value_t;
|
|
20
|
0
|
21
|
|
22 #if (NGX_HTTP_CACHE)
|
|
23 #include <ngx_http_cache.h>
|
|
24 #endif
|
|
25 /* STUB */
|
|
26 #include <ngx_http_cache.h>
|
|
27
|
28
|
28 #include <ngx_http_upstream.h>
|
0
|
29 #include <ngx_http_request.h>
|
|
30 #include <ngx_http_config.h>
|
|
31 #include <ngx_http_busy_lock.h>
|
50
|
32 #include <ngx_http_log_module.h>
|
0
|
33 #include <ngx_http_core_module.h>
|
48
|
34 #include <ngx_http_variables.h>
|
0
|
35
|
|
36 #if (NGX_HTTP_SSL)
|
|
37 #include <ngx_http_ssl_module.h>
|
|
38 #endif
|
|
39
|
|
40
|
28
|
41 struct ngx_http_log_ctx_s {
|
10
|
42 ngx_str_t *client;
|
|
43 ngx_http_request_t *request;
|
28
|
44 };
|
0
|
45
|
|
46
|
48
|
47 #define ngx_http_get_module_ctx(r, module) (r)->ctx[module.ctx_index]
|
0
|
48 #define ngx_http_get_module_err_ctx(r, module) \
|
48
|
49 ((r)->err_ctx ? (r)->err_ctx[module.ctx_index] : (r)->ctx[module.ctx_index])
|
0
|
50
|
48
|
51 #define ngx_http_set_ctx(r, c, module) r->ctx[module.ctx_index] = c;
|
|
52 #define ngx_http_delete_ctx(r, module) r->ctx[module.ctx_index] = NULL;
|
0
|
53
|
|
54
|
|
55 void ngx_http_init_connection(ngx_connection_t *c);
|
|
56
|
|
57 ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b);
|
|
58 ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r);
|
|
59 ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b);
|
|
60
|
|
61 ngx_int_t ngx_http_find_server_conf(ngx_http_request_t *r);
|
|
62 void ngx_http_handler(ngx_http_request_t *r);
|
|
63 void ngx_http_finalize_request(ngx_http_request_t *r, int error);
|
|
64 void ngx_http_writer(ngx_event_t *wev);
|
|
65
|
|
66 void ngx_http_empty_handler(ngx_event_t *wev);
|
|
67
|
|
68 ngx_int_t ngx_http_send_last(ngx_http_request_t *r);
|
|
69 void ngx_http_close_request(ngx_http_request_t *r, int error);
|
|
70 void ngx_http_close_connection(ngx_connection_t *c);
|
54
|
71 u_char * ngx_http_log_error_info(ngx_http_request_t *r, u_char *buf,
|
|
72 size_t len);
|
0
|
73
|
|
74
|
28
|
75 ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r,
|
48
|
76 ngx_http_client_body_handler_pt post_handler);
|
0
|
77
|
|
78 ngx_int_t ngx_http_send_header(ngx_http_request_t *r);
|
48
|
79 ngx_int_t ngx_http_special_response_handler(ngx_http_request_t *r,
|
|
80 ngx_int_t error);
|
0
|
81
|
|
82
|
|
83 time_t ngx_http_parse_time(u_char *value, size_t len);
|
|
84 size_t ngx_http_get_time(char *buf, time_t t);
|
|
85
|
|
86
|
|
87
|
|
88 ngx_int_t ngx_http_discard_body(ngx_http_request_t *r);
|
|
89
|
|
90
|
|
91 extern ngx_module_t ngx_http_module;
|
|
92
|
|
93
|
|
94 extern ngx_uint_t ngx_http_total_requests;
|
|
95 extern uint64_t ngx_http_total_sent;
|
|
96
|
|
97
|
|
98 extern ngx_http_output_header_filter_pt ngx_http_top_header_filter;
|
|
99 extern ngx_http_output_body_filter_pt ngx_http_top_body_filter;
|
|
100
|
|
101
|
|
102 /* STUB */
|
|
103 ngx_int_t ngx_http_log_handler(ngx_http_request_t *r);
|
|
104 /**/
|
|
105
|
|
106
|
|
107 #endif /* _NGX_HTTP_H_INCLUDED_ */
|