Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (30 sloc) 0.935 kb
ce6de44 @kazuho moved from coderepos
kazuho authored
1 #ifndef picohttpparser_h
2 #define picohttpparser_h
3
4117b02 @tokuhirom use $Id$
tokuhirom authored
4 /* $Id$ */
5
c2d0ac6 @tokuhirom work with c++
tokuhirom authored
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
ce6de44 @kazuho moved from coderepos
kazuho authored
10 /* contains name and value of a header (name == NULL if is a continuing line
11 * of a multiline header */
12 struct phr_header {
13 const char* name;
14 size_t name_len;
15 const char* value;
16 size_t value_len;
17 };
18
19 /* returns number of bytes cosumed if successful, -2 if request is partial,
20 * -1 if failed */
21 int phr_parse_request(const char* buf, size_t len, const char** method,
22 size_t* method_len, const char** path,
23 size_t* path_len, int* minor_version,
24 struct phr_header* headers, size_t* num_headers,
25 size_t last_len);
26
903187d @tokuhirom added response parser
tokuhirom authored
27 /* ditto */
28 int phr_parse_response(const char* _buf, size_t len, int *minor_version,
29 int *status, const char **msg, size_t *msg_len,
30 struct phr_header* headers, size_t* num_headers,
31 size_t last_len);
32
c2d0ac6 @tokuhirom work with c++
tokuhirom authored
33 #ifdef __cplusplus
34 }
35 #endif
36
ce6de44 @kazuho moved from coderepos
kazuho authored
37 #endif
Something went wrong with that request. Please try again.