diff --git a/http_parser.c b/http_parser.c index 8122376..8fbbab1 100644 --- a/http_parser.c +++ b/http_parser.c @@ -403,7 +403,7 @@ static struct { }; #undef HTTP_STRERROR_GEN -int http_message_needs_eof(http_parser *parser); +int http_message_needs_eof(const http_parser *parser); /* Our URL parser. * @@ -1841,7 +1841,7 @@ error: /* Does the parser need to see an EOF to find the end of the message? */ int -http_message_needs_eof (http_parser *parser) +http_message_needs_eof (const http_parser *parser) { if (parser->type == HTTP_REQUEST) { return 0; @@ -1864,7 +1864,7 @@ http_message_needs_eof (http_parser *parser) int -http_should_keep_alive (http_parser *parser) +http_should_keep_alive (const http_parser *parser) { if (parser->http_major > 0 && parser->http_minor > 0) { /* HTTP/1.1 */ diff --git a/http_parser.h b/http_parser.h index 887b47c..7908ad0 100644 --- a/http_parser.h +++ b/http_parser.h @@ -294,7 +294,7 @@ size_t http_parser_execute(http_parser *parser, * If you are the server, respond with the "Connection: close" header. * If you are the client, close the connection. */ -int http_should_keep_alive(http_parser *parser); +int http_should_keep_alive(const http_parser *parser); /* Returns a string version of the HTTP method. */ const char *http_method_str(enum http_method m);