33 #ifndef GENLIB_NET_HTTP_HTTPPARSER_H
34 #define GENLIB_NET_HTTP_HTTPPARSER_H
80 #define ENTREAD_DETERMINE_READ_METHOD 1
81 #define ENTREAD_USING_CLEN 2
82 #define ENTREAD_USING_CHUNKED 3
83 #define ENTREAD_UNTIL_CLOSE 4
84 #define ENTREAD_CHUNKY_BODY 5
85 #define ENTREAD_CHUNKY_HEADERS 6
95 HTTPMETHOD_UNSUBSCRIBE,
106 #define HDR_UNKNOWN -1
107 #define HDR_CACHE_CONTROL 1
108 #define HDR_CALLBACK 2
109 #define HDR_CONTENT_LENGTH 3
110 #define HDR_CONTENT_TYPE 4
117 #define HDR_LOCATION 11
122 #define HDR_SERVER 16
125 #define HDR_SOAPACTION 19
127 #define HDR_TIMEOUT 21
128 #define HDR_TRANSFER_ENCODING 22
130 #define HDR_USER_AGENT 24
133 #define HDR_ACCEPT 25
134 #define HDR_ACCEPT_ENCODING 26
135 #define HDR_ACCEPT_CHARSET 27
136 #define HDR_ACCEPT_LANGUAGE 28
137 #define HDR_ACCEPT_RANGE 29
138 #define HDR_CONTENT_ENCODING 30
139 #define HDR_CONTENT_LANGUAGE 31
140 #define HDR_CONTENT_LOCATION 32
141 #define HDR_CONTENT_RANGE 33
142 #define HDR_IF_RANGE 34
218 parser_pos_t position;
220 unsigned int content_length;
275 IN
const char* header_name );
293 IN
int header_name_id, OUT
memptr* value );
321 IN http_method_t request_method );
414 IN
size_t buf_length );
433 parse_status_t matchstr( IN
char *str, IN
size_t slen, IN
const char* fmt, ... );
447 int raw_to_int( IN
memptr* raw_value,
int base );
463 int raw_find_str( IN
memptr* raw_value, IN
const char* str );
477 const char* method_to_str( IN http_method_t method );