Skip to content

Commit

Permalink
Ignore HTCP packets with invalid URI
Browse files Browse the repository at this point in the history
  • Loading branch information
yadij committed Jul 8, 2018
1 parent 5f7b22d commit 79b2379
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/htcp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,12 @@ htcpUnpackSpecifier(char *buf, int sz)

s->request = HttpRequest::CreateFromUrlAndMethod(s->uri, method == Http::METHOD_NONE ? HttpRequestMethod(Http::METHOD_GET) : method);

if (s->request)
HTTPMSGLOCK(s->request);
if (!s->request) {
debugs(31, 3, "failed to create request. Invalid URI?");
return NULL;
}

HTTPMSGLOCK(s->request);
return s;
}

Expand Down

0 comments on commit 79b2379

Please sign in to comment.