Permalink
Browse files

Make http_should_keep_alive() const correct.

  • Loading branch information...
1 parent 2b7e87c commit 9f92347851e2a408a9ac6669e63f82d271476d72 @bnoordhuis bnoordhuis committed Aug 29, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 http_parser.c
  2. +1 −1 http_parser.h
View
@@ -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 @@ 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;
@@ -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 */
View
@@ -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);

0 comments on commit 9f92347

Please sign in to comment.