view src/lib-http/http-header-parser.h @ 16745:572b9a9031e7

lib-http: Implemented limits on overall HTTP header size, size of individual header fields and the number of fields in the header.
author Stephan Bosch <stephan@rename-it.nl>
date Sun, 15 Sep 2013 03:46:12 +0300
parents 107c8b2c9594
children 4650bfc057fb
line wrap: on
line source

#ifndef HTTP_HEADER_PARSER_H
#define HTTP_HEADER_PARSER_H

struct http_header_limits;
struct http_header_parser;

struct http_header_parser *
http_header_parser_init(struct istream *input,
	const struct http_header_limits *limits);
void http_header_parser_deinit(struct http_header_parser **_parser);

void http_header_parser_reset(struct http_header_parser *parser);

int http_header_parse_next_field(struct http_header_parser *parser,
	const char **name_r, const unsigned char **data_r, size_t *size_r,
	const char **error_r);

#endif