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@
-/* $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 <nils_fisher@hotmail.com>
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
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));