Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Make http_should_keep_alive() const correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 29, 2012
1 parent 2b7e87c commit 9f92347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions http_parser.c
Expand Up @@ -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.
*
Expand Down Expand Up @@ -1841,7 +1841,7 @@ size_t http_parser_execute (http_parser *parser,

/* 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;
Expand All @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion http_parser.h
Expand Up @@ -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);
Expand Down

0 comments on commit 9f92347

Please sign in to comment.