From: Pierre Phaneuf Date: Thu, 29 Apr 2010 04:33:13 +0000 (-0700) Subject: Allow empty reason line in HTTP status X-Git-Tag: release-2.0.5-beta~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=739e6882757a0b6b398f95859da4720ca60269c8;p=libevent Allow empty reason line in HTTP status --- 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;