From: claudio Date: Mon, 10 May 2021 15:12:33 +0000 (+0000) Subject: To add keep-alive support the read handler got changed a lot. Now when X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cb5cc1c3667820727c6b11bdc057097c582f95f0;p=openbsd To add keep-alive support the read handler got changed a lot. Now when tls_read hits the EOF (s == 0) case it is always a cause to close the connection. All possible data was already consumed and if something is still in the buffer then it remained in there for a reason. Issue noticed and OK deraadt@ --- diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index 1ce8cd52536..224d456ee35 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.32 2021/04/20 14:32:49 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.33 2021/05/10 15:12:33 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -1123,7 +1123,7 @@ read_more: return WANT_POLLOUT; } - if (s == 0 && conn->bufpos == 0) { + if (s == 0) { if (conn->req) warnx("%s: short read, connection closed", http_info(conn->req->uri));