Skip to content

Commit

Permalink
http: return from httpGets2() on unhandled errors
Browse files Browse the repository at this point in the history
Closes: OpenPrinting#879

In case of some errors httpGets2 waits for the next packet. In all cases of
errors it should return NULL.

Signed-off-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
xypron committed Jan 31, 2024
1 parent a01c48c commit a29345f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cups/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ httpGets2(http_t *http, // I - HTTP connection
continue;

http->error = WSAGetLastError();
return (NULL);
}
else if (WSAGetLastError() != http->error)
{
Expand All @@ -1113,6 +1114,7 @@ httpGets2(http_t *http, // I - HTTP connection
continue;

http->error = errno;
return (NULL);
}
else if (errno != http->error)
{
Expand Down

0 comments on commit a29345f

Please sign in to comment.