mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-15 15:25:09 -04:00
Do not abort HTTP requests missing a reason string.
Some (arguably broken) HTTP servers do not put the reason message in their status line, which causes evhttp to consider the response invalid. http://sourceforge.net/tracker/?func=detail&aid=2875077&group_id=50884&atid=461322
This commit is contained in:
parent
ae6ece02f6
commit
29d7b32813
7
http.c
7
http.c
@ -1230,15 +1230,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user