Tor
0.4.7.0-alpha-dev
|
Header for proto_http.c. More...
Go to the source code of this file.
Functions | |
int | fetch_from_buf_http (struct buf_t *buf, char **headers_out, size_t max_headerlen, char **body_out, size_t *body_used, size_t max_bodylen, int force_complete) |
int | peek_buf_has_http_command (const struct buf_t *buf) |
Header for proto_http.c.
Definition in file proto_http.h.
int fetch_from_buf_http | ( | buf_t * | buf, |
char ** | headers_out, | ||
size_t | max_headerlen, | ||
char ** | body_out, | ||
size_t * | body_used, | ||
size_t | max_bodylen, | ||
int | force_complete | ||
) |
There is a (possibly incomplete) http statement on buf, of the form "\%s\\r\\n\\r\\n\%s", headers, body. (body may contain NULs.) If a) the headers include a Content-Length field and all bytes in the body are present, or b) there's no Content-Length field and all headers are present, then:
Else, change nothing and return 0.
Definition at line 50 of file proto_http.c.
Referenced by connection_fetch_from_buf_http(), and connection_read_https_proxy_response().