Mercurial > hg > nginx-quic
comparison src/http/ngx_http.h @ 0:4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
The first code that uses "ngx_" prefix, the previous one used "gx_" prefix.
At that point the code is not yet usable. The first draft ideas are dated
back to 23.10.2001.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 06 Aug 2002 16:39:45 +0000 |
parents | |
children | d220029ac7f3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4eff17414a43 |
---|---|
1 #ifndef _NGX_HTTP_H_INCLUDED_ | |
2 #define _NGX_HTTP_H_INCLUDED_ | |
3 | |
4 | |
5 #include <ngx_config.h> | |
6 #include <ngx_types.h> | |
7 #include <ngx_connection.h> | |
8 | |
9 | |
10 #define NGX_SYS_ERROR -1 | |
11 #define NGX_HTTP_INVALID_METHOD -2 | |
12 #define NGX_HTTP_INVALID_REQUEST -3 | |
13 #define NGX_HTTP_INVALID_HEADER -4 | |
14 | |
15 #define NGX_HTTP_GET 1 | |
16 #define NGX_HTTP_HEAD 2 | |
17 #define NGX_HTTP_POST 3 | |
18 | |
19 #define NGX_HTTP_CONN_CLOSE 0 | |
20 #define NGX_HTTP_CONN_KEEP_ALIVE 1 | |
21 | |
22 #define NGX_HTTP_OK 200 | |
23 | |
24 | |
25 typedef struct { | |
26 char *buff; | |
27 char *pos; | |
28 char *last; | |
29 char *end; | |
30 } ngx_buff_t; | |
31 | |
32 typedef struct { | |
33 int status; | |
34 int connection; | |
35 size_t content_length; | |
36 char *content_type; | |
37 char *charset; | |
38 char *etag; | |
39 time_t date; | |
40 time_t last_modified; | |
41 } ngx_http_header_out_t; | |
42 | |
43 typedef struct ngx_http_request_s ngx_http_request_t; | |
44 | |
45 struct ngx_http_request_s { | |
46 int method; | |
47 | |
48 int http_version; | |
49 int http_major; | |
50 int http_minor; | |
51 | |
52 char *uri; | |
53 ngx_http_request_t *main; | |
54 | |
55 ngx_connection_t *connection; | |
56 ngx_buff_t *buff; | |
57 ngx_pool_t *pool; | |
58 | |
59 /* internal */ | |
60 unsigned unusual_uri:1; | |
61 unsigned complex_uri:1; | |
62 | |
63 int state; | |
64 char *uri_start; | |
65 char *uri_end; | |
66 char *uri_ext; | |
67 char *args_start; | |
68 char *header_name_start; | |
69 char *header_name_end; | |
70 char *header_start; | |
71 char *header_end; | |
72 #ifdef NGX_EVENT | |
73 int (*state_handler)(ngx_http_request_t *r); | |
74 #endif | |
75 }; | |
76 | |
77 | |
78 #define NGX_INDEX "index.html" | |
79 | |
80 | |
81 int ngx_http_init_connection(ngx_connection_t *c); | |
82 | |
83 | |
84 #endif /* _NGX_HTTP_H_INCLUDED_ */ |