src/server/daemon/httprequest.h

changeset 101
7fbcdbad0baa
parent 95
74a81d9e19d0
child 102
136a76e293b5
equal deleted inserted replaced
100:e9bb8449df02 101:7fbcdbad0baa
54 HeaderArray *headers; 54 HeaderArray *headers;
55 netbuf *netbuf; 55 netbuf *netbuf;
56 }; 56 };
57 57
58 struct _header { 58 struct _header {
59 char *name; 59 sstr_t name;
60 char *value; 60 sstr_t value;
61 }; 61 };
62 62
63 struct _header_array { 63 struct _header_array {
64 HeaderArray *next; 64 HeaderArray *next;
65 Header *headers; 65 Header *headers;
68 }; 68 };
69 69
70 void http_request_init(HTTPRequest *req); 70 void http_request_init(HTTPRequest *req);
71 void http_request_cleanup(HTTPRequest *req); 71 void http_request_cleanup(HTTPRequest *req);
72 72
73 sstr_t http_request_get_abspath(HTTPRequest *req);
74
73 /* 75 /*
74 * starts request processing after reading the request header 76 * starts request processing after reading the request header
75 * 77 *
76 * request: request object 78 * request: request object
77 * pool: current thread pool or NULL 79 * pool: current thread pool or NULL
78 */ 80 */
79 int handle_request(HTTPRequest *request, threadpool_t *pool); 81 int handle_request(HTTPRequest *request, threadpool_t *pool);
80 82
81 83
82 84
83 void header_add(HeaderArray *hd, char *name, char *value); 85 void header_add(HeaderArray *hd, sstr_t name, sstr_t value);
84 void header_array_free(HeaderArray *hd); 86 void header_array_free(HeaderArray *hd);
85 87
86 int nsapi_handle_request(NSAPISession *sn, NSAPIRequest *rq); 88 int nsapi_handle_request(NSAPISession *sn, NSAPIRequest *rq);
87 int nsapi_finish_request(NSAPISession *sn, NSAPIRequest *rq); 89 int nsapi_finish_request(NSAPISession *sn, NSAPIRequest *rq);
88 90

mercurial