metrics: Add new relay metrics to MetricsPort
[tor.git] / src / core / proto / proto_http.h
blobe77347999bda63386942d11e22b8ef60283cf847
1 /* Copyright (c) 2001 Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * @file proto_http.h
9 * @brief Header for proto_http.c
10 **/
12 #ifndef TOR_PROTO_HTTP_H
13 #define TOR_PROTO_HTTP_H
15 struct buf_t;
17 int fetch_from_buf_http(struct buf_t *buf,
18 char **headers_out, size_t max_headerlen,
19 char **body_out, size_t *body_used, size_t max_bodylen,
20 int force_complete);
21 int peek_buf_has_http_command(const struct buf_t *buf);
23 #ifdef PROTO_HTTP_PRIVATE
24 STATIC int buf_http_find_content_length(const char *headers, size_t headerlen,
25 size_t *result_out);
26 #endif
28 #endif /* !defined(TOR_PROTO_HTTP_H) */