Skip to content

Commit

Permalink
add missing return in the case when server sends invalid/non-parseabl…
Browse files Browse the repository at this point in the history
…e HTTP response [fixes #174]
  • Loading branch information
ekoby committed Sep 10, 2023
1 parent 4f5be5d commit d117267
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ static void http_read_cb(uv_link_t *link, ssize_t nread, const uv_buf_t *buf) {
fail_active_request(c, UV_EINVAL, "failed to parse HTTP response");
close_connection(c);
free(buf->base);

return;
}
}

if (c->active->state == completed) {
if (c->active->state == completed) {
tlsuv_http_req_t *hr = c->active;
c->active = NULL;

Expand All @@ -119,8 +119,7 @@ static void http_read_cb(uv_link_t *link, ssize_t nread, const uv_buf_t *buf) {

if (!keep_alive) {
close_connection(c);
}
else {
} else {
uv_async_send(&c->proc);
}
}
Expand Down

0 comments on commit d117267

Please sign in to comment.