From 739e6882757a0b6b398f95859da4720ca60269c8 Mon Sep 17 00:00:00 2001 From: Pierre Phaneuf Date: Wed, 28 Apr 2010 21:33:13 -0700 Subject: [PATCH] Allow empty reason line in HTTP status --- http.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/http.c b/http.c index 2ebb390f..511bff87 100644 --- a/http.c +++ b/http.c @@ -1256,15 +1256,14 @@ evhttp_parse_response_line(struct evhttp_request *req, char *line) { char *protocol; char *number; - char *readable; + char *readable = ""; protocol = strsep(&line, " "); if (line == NULL) return (-1); number = strsep(&line, " "); - if (line == NULL) - return (-1); - readable = line; + if (line != NULL) + readable = line; if (strcmp(protocol, "HTTP/1.0") == 0) { req->major = 1; -- 2.40.0