Go to the documentation of this file.
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_DELETE = 1,
100 HTTPMETHOD_SUBSCRIBE,
101 HTTPMETHOD_UNSUBSCRIBE,
110 #define HDR_UNKNOWN -1
111 #define HDR_CACHE_CONTROL 1
112 #define HDR_CALLBACK 2
113 #define HDR_CONTENT_LENGTH 3
114 #define HDR_CONTENT_TYPE 4
121 #define HDR_LOCATION 11
126 #define HDR_SERVER 16
129 #define HDR_SOAPACTION 19
131 #define HDR_TIMEOUT 21
132 #define HDR_TRANSFER_ENCODING 22
134 #define HDR_USER_AGENT 24
137 #define HDR_ACCEPT 25
138 #define HDR_ACCEPT_ENCODING 26
139 #define HDR_ACCEPT_CHARSET 27
140 #define HDR_ACCEPT_LANGUAGE 28
141 #define HDR_ACCEPT_RANGE 29
142 #define HDR_CONTENT_ENCODING 30
143 #define HDR_CONTENT_LANGUAGE 31
144 #define HDR_CONTENT_LOCATION 32
145 #define HDR_CONTENT_RANGE 33
146 #define HDR_IF_RANGE 34
222 parser_pos_t position;
224 unsigned int content_length;
279 IN
const char* header_name );
297 IN
int header_name_id, OUT
memptr* value );
325 IN http_method_t request_method );
418 IN
size_t buf_length );
437 parse_status_t matchstr( IN
char *str, IN
size_t slen, IN
const char* fmt, ... );
451 int raw_to_int( IN
memptr* raw_value,
int base );
467 int raw_find_str( IN
memptr* raw_value, IN
const char* str );
481 const char* method_to_str( IN http_method_t method );
int entire_msg_loaded
Definition: httpparser.h:68
http_method_t request_method
Definition: httpparser.h:186
int status_code
Definition: httpparser.h:188
Definition: httpparser.h:213
void print_http_headers(http_message_t *hmsg)
Print the HTTP headers.
Definition: httpparser.c:2199
membuffer * msg
Definition: httpparser.h:63
@ PARSE_OK
Definition: httpparser.h:161
@ PARSE_INCOMPLETE_ENTITY
Definition: httpparser.h:157
memptr entity
Definition: httpparser.h:205
Definition: membuffer.h:47
uri_type uri
Definition: httpparser.h:184
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:99
Definition: membuffer.h:56
@ PARSE_CONTINUE_1
Definition: httpparser.h:165
size_t amount_discarded
Definition: httpparser.h:194
parse_status_t
Definition: httpparser.h:151
@ PARSE_INCOMPLETE
Definition: httpparser.h:155
Definition: httpparser.h:179
int http_error_code
Definition: httpparser.h:217
int valid_ssdp_notify_hack
Definition: httpparser.h:220
Represents a URI used in parse_uri and elsewhere.
Definition: uri.h:136
Definition: httpparser.h:61
membuffer msg
Definition: httpparser.h:208
Definition: LinkedList.h:84
int is_request
Definition: httpparser.h:197
@ PARSE_FAILURE
Definition: httpparser.h:159
char * urlbuf
Definition: httpparser.h:210
LinkedList headers
Definition: httpparser.h:203
size_t cursor
Definition: httpparser.h:65
http_method_t method
Definition: httpparser.h:182
@ PARSE_SUCCESS
Definition: httpparser.h:153
@ PARSE_NO_MATCH
Definition: httpparser.h:163
membuffer status_msg
Definition: httpparser.h:190
size_t entity_start_position
Definition: httpparser.h:228