src/server/daemon/httpparser.h

changeset 415
d938228c382e
parent 180
98462e878ca7
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
28 28
29 #ifndef HTTPPARSER_H 29 #ifndef HTTPPARSER_H
30 #define HTTPPARSER_H 30 #define HTTPPARSER_H
31 31
32 32
33 #include <ucx/string.h> 33 #include <cx/string.h>
34 #include "httprequest.h" 34 #include "httprequest.h"
35 35
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
47 47
48 typedef struct _http_parser { 48 typedef struct _http_parser {
49 HTTPRequest *request; 49 HTTPRequest *request;
50 50
51 int state; 51 int state;
52 sstr_t start_line; 52 cxmutstr start_line;
53 53
54 /* local parser variables */ 54 /* local parser variables */
55 int wl; /* only white space */ 55 int wl; /* only white space */
56 int tk; /* token: 0: header name 1: header value */ 56 int tk; /* token: 0: header name 1: header value */
57 int offset; /* offset of parsed string */ 57 int offset; /* offset of parsed string */
58 int strend; /* end position */ 58 int strend; /* end position */
59 sstr_t name; 59 cxmutstr name;
60 sstr_t value; 60 cxmutstr value;
61 61
62 } HttpParser; 62 } HttpParser;
63 63
64 HttpParser* http_parser_new(HTTPRequest *request); 64 HttpParser* http_parser_new(HTTPRequest *request);
65 void http_parser_free(HttpParser *parser); 65 void http_parser_free(HttpParser *parser);

mercurial