Make http_should_keep_alive() const correct.

v0.10
Ben Noordhuis 12 years ago
parent 2b7e87cc77
commit 9f92347851

@ -403,7 +403,7 @@ static struct {
}; };
#undef HTTP_STRERROR_GEN #undef HTTP_STRERROR_GEN
int http_message_needs_eof(http_parser *parser); int http_message_needs_eof(const http_parser *parser);
/* Our URL parser. /* Our URL parser.
* *
@ -1841,7 +1841,7 @@ error:
/* Does the parser need to see an EOF to find the end of the message? */ /* Does the parser need to see an EOF to find the end of the message? */
int int
http_message_needs_eof (http_parser *parser) http_message_needs_eof (const http_parser *parser)
{ {
if (parser->type == HTTP_REQUEST) { if (parser->type == HTTP_REQUEST) {
return 0; return 0;
@ -1864,7 +1864,7 @@ http_message_needs_eof (http_parser *parser)
int 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) { if (parser->http_major > 0 && parser->http_minor > 0) {
/* HTTP/1.1 */ /* HTTP/1.1 */

@ -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 server, respond with the "Connection: close" header.
* If you are the client, close the connection. * 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. */ /* Returns a string version of the HTTP method. */
const char *http_method_str(enum http_method m); const char *http_method_str(enum http_method m);

Loading…
Cancel
Save