diff --git a/http_parser.h b/http_parser.h index ccc4f52..5855e89 100644 --- a/http_parser.h +++ b/http_parser.h @@ -135,28 +135,6 @@ size_t http_parse_responses(http_parser *parser, const char *data, size_t len); */ int http_should_keep_alive(http_parser *parser); -static inline const char * http_method_str (enum http_method method) -{ - switch (method) { - case HTTP_DELETE: return "DELETE"; - case HTTP_GET: return "GET"; - case HTTP_HEAD: return "HEAD"; - case HTTP_POST: return "POST"; - case HTTP_PUT: return "PUT"; - case HTTP_CONNECT: return "CONNECT"; - case HTTP_OPTIONS: return "OPTIONS"; - case HTTP_TRACE: return "TRACE"; - case HTTP_COPY: return "COPY"; - case HTTP_LOCK: return "LOCK"; - case HTTP_MKCOL: return "MKCOL"; - case HTTP_MOVE: return "MOVE"; - case HTTP_PROPFIND: return "PROPFIND"; - case HTTP_PROPPATCH: return "PROPPATCH"; - case HTTP_UNLOCK: return "UNLOCK"; - default: return (const char*)0; - } -} - #ifdef __cplusplus } #endif diff --git a/test.c b/test.c index 96e1849..6fdc372 100644 --- a/test.c +++ b/test.c @@ -1049,9 +1049,6 @@ main (void) printf("sizeof(http_parser) = %d\n", sizeof(http_parser)); - assert(strcmp(http_method_str(HTTP_GET), "GET") == 0); - assert(strcmp(http_method_str(HTTP_CONNECT), "CONNECT") == 0); - for (request_count = 0; requests[request_count].name; request_count++); for (response_count = 0; responses[response_count].name; response_count++);