]> granicus.if.org Git - libevent/commitdiff
Allow empty reason line in HTTP status
authorPierre Phaneuf <pphaneuf@gmail.com>
Thu, 29 Apr 2010 04:33:13 +0000 (21:33 -0700)
committerNiels Provos <provos@gmail.com>
Thu, 29 Apr 2010 04:33:13 +0000 (21:33 -0700)
http.c

diff --git a/http.c b/http.c
index 2ebb390f9cb021af0f732dd6ad44a1b23c42ba88..511bff877828a8e3a63d39d5859dce5980132bab 100644 (file)
--- 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;