comparison src/http/ngx_http.h @ 7:b5481d6fbbd4

nginx-0.0.1-2002-08-29-20:59:54 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 29 Aug 2002 16:59:54 +0000
parents 669801705ab1
children 708f8bb772ec
comparison
equal deleted inserted replaced
6:669801705ab1 7:b5481d6fbbd4
2 #define _NGX_HTTP_H_INCLUDED_ 2 #define _NGX_HTTP_H_INCLUDED_
3 3
4 4
5 #include <ngx_config.h> 5 #include <ngx_config.h>
6 #include <ngx_types.h> 6 #include <ngx_types.h>
7 #include <ngx_hunk.h>
7 #include <ngx_file.h> 8 #include <ngx_file.h>
8 #include <ngx_connection.h> 9 #include <ngx_connection.h>
9 10
10
11 #define NGX_SYS_ERROR -1
12 #define NGX_HTTP_INVALID_METHOD -2
13 #define NGX_HTTP_INVALID_REQUEST -3
14 #define NGX_HTTP_INVALID_HEADER -4
15 11
16 #define NGX_HTTP_GET 1 12 #define NGX_HTTP_GET 1
17 #define NGX_HTTP_HEAD 2 13 #define NGX_HTTP_HEAD 2
18 #define NGX_HTTP_POST 3 14 #define NGX_HTTP_POST 3
19 15
20 #define NGX_HTTP_CONN_CLOSE 0 16 #define NGX_HTTP_CONN_CLOSE 0
21 #define NGX_HTTP_CONN_KEEP_ALIVE 1 17 #define NGX_HTTP_CONN_KEEP_ALIVE 1
22 18
23 #define NGX_OK 0 19
20 #define NGX_HTTP_HEADER_DONE 1
21 #define NGX_HTTP_INVALID_METHOD 10
22 #define NGX_HTTP_INVALID_REQUEST 11
23 #define NGX_HTTP_INVALID_HEAD 12
24 #define NGX_HTTP_INVALID_HEADER 13
25
24 26
25 #define NGX_HTTP_OK 200 27 #define NGX_HTTP_OK 200
26 #define NGX_HTTP_MOVED_PERMANENTLY 302 28 #define NGX_HTTP_MOVED_PERMANENTLY 302
29 #define NGX_HTTP_BAD_REQUEST 400
27 #define NGX_HTTP_NOT_FOUND 404 30 #define NGX_HTTP_NOT_FOUND 404
28 #define NGX_HTTP_INTERNAL_SERVER_ERROR 503 31 #define NGX_HTTP_INTERNAL_SERVER_ERROR 503
29 32
30 33
31 #define NGX_HTTP_STATIC_HANDLER 0 34 #define NGX_HTTP_STATIC_HANDLER 0
38 41
39 /* STUB */ 42 /* STUB */
40 #define ngx_get_module_ctx(r, module) (module)->ctx 43 #define ngx_get_module_ctx(r, module) (module)->ctx
41 44
42 typedef struct { 45 typedef struct {
43 char *doc_root; 46 char *doc_root;
44 size_t doc_root_len; 47 size_t doc_root_len;
45 size_t buff_size; 48 size_t buff_size;
49
50 unsigned int header_timeout;
46 } ngx_http_server_t; 51 } ngx_http_server_t;
47 52
48 typedef struct { 53 typedef struct {
49 char *buff; 54 char *buff;
50 char *pos; 55 char *pos;
70 struct ngx_http_request_s { 75 struct ngx_http_request_s {
71 char *filename; 76 char *filename;
72 char *location; 77 char *location;
73 ngx_fd_t fd; 78 ngx_fd_t fd;
74 79
80 ngx_pool_t *pool;
81 ngx_hunk_t *header_in;
82
83 /*
84 ngx_http_headers_in_t *headers_in;
85 */
75 ngx_http_headers_out_t *headers_out; 86 ngx_http_headers_out_t *headers_out;
76 87
77 int filename_len; 88 int filename_len;
78 int (*handler)(ngx_http_request_t *r); 89 int (*handler)(ngx_http_request_t *r);
79 90
88 char *uri; 99 char *uri;
89 ngx_http_request_t *main; 100 ngx_http_request_t *main;
90 101
91 ngx_connection_t *connection; 102 ngx_connection_t *connection;
92 ngx_http_server_t *server; 103 ngx_http_server_t *server;
93 ngx_buff_t *buff;
94 ngx_pool_t *pool;
95 104
96 int filter; 105 int filter;
106
107 unsigned header_timeout:1;
97 108
98 unsigned header_only:1; 109 unsigned header_only:1;
99 unsigned unusual_uri:1; 110 unsigned unusual_uri:1;
100 unsigned complex_uri:1; 111 unsigned complex_uri:1;
101 112