From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id AA31E1FF16F
	for <inbox@lore.proxmox.com>; Thu, 27 Feb 2025 00:02:47 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id F40CF1E386;
	Thu, 27 Feb 2025 00:02:44 +0100 (CET)
Date: Wed, 26 Feb 2025 22:51:39 +0000
To: pve-devel@lists.proxmox.com
In-Reply-To: <20250226225126.346918-1-admin@truthsolo.net>
References: <20250226225126.346918-1-admin@truthsolo.net>
MIME-Version: 1.0
Message-ID: <mailman.598.1740610963.293.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: Rob Rozestraten via pve-devel <pve-devel@lists.proxmox.com>
Precedence: list
Cc: Rob Rozestraten <admin@truthsolo.net>
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: [pve-devel] [PATCH pve-http-server 1/1] close TLS gracefully to
 avoid unexpected EOF at client
Content-Type: multipart/mixed; boundary="===============0031913851812689722=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

--===============0031913851812689722==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <admin@truthsolo.net>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id A4EBED172A
	for <pve-devel@lists.proxmox.com>; Thu, 27 Feb 2025 00:02:42 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 859E91E314
	for <pve-devel@lists.proxmox.com>; Thu, 27 Feb 2025 00:02:42 +0100 (CET)
Received: from mail-41104.protonmail.ch (mail-41104.protonmail.ch [185.70.41.104])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Thu, 27 Feb 2025 00:02:41 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=truthsolo.net;
	s=protonmail3; t=1740610311; x=1740869511;
	bh=mAlXKGVtb3tyW5rK8GrGayYsu4MXhi3j8vOCBdFJ1Wk=;
	h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
	 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
	 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
	b=jjQ5qXn7f6c9CgEsc24mAbB6TmS0K2MRwiBeHfEAXtmaLRWePaGhQqeO8qIzYRqBB
	 17hc8CfEDqGdPXRBeIqOm7LrZxX0mlIRM622P2T+5SoFl2DVsTB0mf8EuhM1T8cCAk
	 iDZvm2dYesW+dq2qNU+gDgW+6GyC+c6lNH/VKz7Gf5zRvbeOZamRm38gtdnMhL4kH0
	 H9V7mVzjNRG29HGvJ/HmYVli+NYqHJsTEU0/6u1VziTrO4YEGiLiEIyENj8SSBItZn
	 W1Pe8207PRRSAJTwfjLXmSvUl4Rs/KqiIFRnok569Ps1UXaxeTPM2kDM9VDSpbTWRb
	 jJVKNww3auAUA==
Date: Wed, 26 Feb 2025 22:51:39 +0000
To: pve-devel@lists.proxmox.com
From: Rob Rozestraten <admin@truthsolo.net>
Subject: [PATCH pve-http-server 1/1] close TLS gracefully to avoid unexpected EOF at client
Message-ID: <20250226225126.346918-2-admin@truthsolo.net>
In-Reply-To: <20250226225126.346918-1-admin@truthsolo.net>
References: <20250226225126.346918-1-admin@truthsolo.net>
Feedback-ID: 48530542:user:proton
X-Pm-Message-ID: e837c9fabf56d5e647b1b3a9008895c755e264a7
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results:  0
	AWL                     0.002 Adjusted score from AWL reputation of From: address
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid
	DKIM_VALID               -0.1 Message has at least one valid DKIM or DK signature
	DKIM_VALID_AU            -0.1 Message has a valid DKIM or DK signature from author's domain
	DKIM_VALID_EF            -0.1 Message has a valid DKIM or DK signature from envelope-from domain
	DMARC_PASS               -0.1 DMARC pass policy
	RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/, no trust
	SPF_HELO_PASS          -0.001 SPF: HELO matches SPF record
	SPF_PASS               -0.001 SPF: sender matches SPF record

Signed-off-by: Rob Rozestraten <admin@truthsolo.net>
---
 src/PVE/APIServer/AnyEvent.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
index 8a52836..771b153 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -141,6 +141,7 @@ sub client_do_disconnect {
     my $shutdown_hdl =3D sub {
 =09my $hdl =3D shift;
=20
+=09$hdl->stoptls() if $hdl->{tls};
 =09shutdown($hdl->{fh}, 1);
 =09# clear all handlers
 =09$hdl->on_drain(undef);
--=20
2.48.1




--===============0031913851812689722==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--===============0031913851812689722==--