From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 28BDF1FF0AB for ; Wed, 09 Sep 2026 14:36:33 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E26A9215D3; Wed, 09 Sep 2026 14:36:31 +0200 (CEST) Message-ID: Date: Wed, 9 Sep 2026 14:36:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH http-server 2/2] websocket: include close reason in debug log To: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= , pve-devel@lists.proxmox.com References: <20260909120309.432116-1-f.gruenbichler@proxmox.com> <20260909120309.432116-2-f.gruenbichler@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260909120309.432116-2-f.gruenbichler@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788957379633 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.489 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: F4NRTKXMLOQ3XRYJA2QFPTZPQPSBXEY3 X-Message-ID-Hash: F4NRTKXMLOQ3XRYJA2QFPTZPQPSBXEY3 X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Reviewed-by: Dominik Csapak On 9/9/26 2:03 PM, Fabian Grünbichler wrote: > if given by the client. > > Signed-off-by: Fabian Grünbichler > --- > src/PVE/APIServer/AnyEvent.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm > index 12701aa..44e4568 100644 > --- a/src/PVE/APIServer/AnyEvent.pm > +++ b/src/PVE/APIServer/AnyEvent.pm > @@ -678,7 +678,9 @@ sub websocket_proxy { > $self->dprint("websocket received close with too short payload: $payload_len"); > } else { > my $statuscode = unpack("n", $payload); > - $self->dprint("websocket received close. status code: '$statuscode'"); > + my $reason = substr($payload, 2, $payload_len - 2); > + $reason = '-' if !$reason; > + $self->dprint("websocket received close. status code: '$statuscode', reason: '$reason'"); > } > if (my $proxyhdl = $reqstate->{proxyhdl}) { > $proxyhdl->{block_disconnect} = 1 if length $proxyhdl->{wbuf};