Mercurial > hg > nginx
comparison src/http/ngx_http.h @ 3:34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 20 Aug 2002 14:48:28 +0000 |
parents | ffffe1499bce |
children | c5f071d376e5 |
comparison
equal
deleted
inserted
replaced
2:ffffe1499bce | 3:34a521b1a148 |
---|---|
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_file.h> | |
7 #include <ngx_connection.h> | 8 #include <ngx_connection.h> |
8 | 9 |
9 | 10 |
10 #define NGX_SYS_ERROR -1 | 11 #define NGX_SYS_ERROR -1 |
11 #define NGX_HTTP_INVALID_METHOD -2 | 12 #define NGX_HTTP_INVALID_METHOD -2 |
20 #define NGX_HTTP_CONN_KEEP_ALIVE 1 | 21 #define NGX_HTTP_CONN_KEEP_ALIVE 1 |
21 | 22 |
22 #define NGX_OK 0 | 23 #define NGX_OK 0 |
23 | 24 |
24 #define NGX_HTTP_OK 200 | 25 #define NGX_HTTP_OK 200 |
26 #define NGX_HTTP_MOVED_PERMANENTLY 302 | |
25 #define NGX_HTTP_NOT_FOUND 404 | 27 #define NGX_HTTP_NOT_FOUND 404 |
26 #define NGX_HTTP_INTERNAL_SERVER_ERROR 503 | 28 #define NGX_HTTP_INTERNAL_SERVER_ERROR 503 |
27 | 29 |
28 | 30 |
29 #define NGX_HTTP_STATIC_HANDLER 0 | 31 #define NGX_HTTP_STATIC_HANDLER 0 |
36 | 38 |
37 /* STUB */ | 39 /* STUB */ |
38 #define ngx_get_module_ctx(r, module) (module)->ctx | 40 #define ngx_get_module_ctx(r, module) (module)->ctx |
39 | 41 |
40 typedef struct { | 42 typedef struct { |
41 char *doc_root; | 43 char *doc_root; |
42 int doc_root_len; | 44 size_t doc_root_len; |
45 size_t buff_size; | |
43 } ngx_http_server_t; | 46 } ngx_http_server_t; |
44 | 47 |
45 typedef struct { | 48 typedef struct { |
46 char *buff; | 49 char *buff; |
47 char *pos; | 50 char *pos; |
50 } ngx_buff_t; | 53 } ngx_buff_t; |
51 | 54 |
52 typedef struct { | 55 typedef struct { |
53 int status; | 56 int status; |
54 int connection; | 57 int connection; |
55 size_t content_length; | 58 off_t content_length; |
59 char *location; | |
56 char *content_type; | 60 char *content_type; |
57 char *charset; | 61 char *charset; |
58 char *etag; | 62 char *etag; |
63 char *server; | |
59 time_t date; | 64 time_t date; |
60 time_t last_modified; | 65 time_t last_modified; |
61 } ngx_http_header_out_t; | 66 } ngx_http_headers_out_t; |
62 | 67 |
63 typedef struct ngx_http_request_s ngx_http_request_t; | 68 typedef struct ngx_http_request_s ngx_http_request_t; |
64 | 69 |
65 struct ngx_http_request_s { | 70 struct ngx_http_request_s { |
66 char *filename; | 71 char *filename; |
67 char *location; | 72 char *location; |
73 ngx_file_t fd; | |
74 | |
75 ngx_http_headers_out_t *headers_out; | |
68 | 76 |
69 int filename_len; | 77 int filename_len; |
70 int (*handler)(ngx_http_request_t *r); | 78 int (*handler)(ngx_http_request_t *r); |
79 | |
80 ngx_file_info_t file_info; | |
71 | 81 |
72 int method; | 82 int method; |
73 | 83 |
74 int http_version; | 84 int http_version; |
75 int http_major; | 85 int http_major; |
81 ngx_connection_t *connection; | 91 ngx_connection_t *connection; |
82 ngx_http_server_t *server; | 92 ngx_http_server_t *server; |
83 ngx_buff_t *buff; | 93 ngx_buff_t *buff; |
84 ngx_pool_t *pool; | 94 ngx_pool_t *pool; |
85 | 95 |
86 /* internal */ | 96 unsigned header_only:1; |
87 unsigned unusual_uri:1; | 97 unsigned unusual_uri:1; |
88 unsigned complex_uri:1; | 98 unsigned complex_uri:1; |
89 | 99 |
90 int state; | 100 int state; |
91 char *uri_start; | 101 char *uri_start; |