Skip to content

Commit

Permalink
http: allow non RFC3986 conformant during parsing request-line (http …
Browse files Browse the repository at this point in the history
…server)

Reported-by: [email protected]
  • Loading branch information
azat committed Oct 22, 2018
1 parent 64ead34 commit b94d913
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1707,14 +1707,14 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)

/* Parse the request line */
method = strsep(&line, " ");
if (line == NULL)
return (-1);
uri = strsep(&line, " ");
if (line == NULL)
return (-1);
version = strsep(&line, " ");
if (line != NULL)
return (-1);
if (!line)
return -1;
uri = line;
version = strrchr(uri, ' ');
if (!version || uri == version)
return -1;
*version = '\0';
version++;

method_len = (uri - method) - 1;
type = EVHTTP_REQ_UNKNOWN_;
Expand Down

0 comments on commit b94d913

Please sign in to comment.