From unknown Thu Aug 21 12:10:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44036 <44036@debbugs.gnu.org> To: bug#44036 <44036@debbugs.gnu.org> Subject: Status: [PATCH] Fix xpra HTML server Reply-To: bug#44036 <44036@debbugs.gnu.org> Date: Thu, 21 Aug 2025 19:10:25 +0000 retitle 44036 [PATCH] Fix xpra HTML server reassign 44036 guix-patches submitter 44036 Lars-Dominik Braun severity 44036 normal tag 44036 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 16 13:18:19 2020 Received: (at submit) by debbugs.gnu.org; 16 Oct 2020 17:18:19 +0000 Received: from localhost ([127.0.0.1]:60746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTTMr-0001FK-5S for submit@debbugs.gnu.org; Fri, 16 Oct 2020 13:18:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:41484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTTMn-0001FB-GB for submit@debbugs.gnu.org; Fri, 16 Oct 2020 13:18:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTTMn-0000QK-8U for guix-patches@gnu.org; Fri, 16 Oct 2020 13:18:09 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:57374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kTTMh-00088H-Kk for guix-patches@gnu.org; Fri, 16 Oct 2020 13:18:08 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4CCXsf4jXRzQlKq for ; Fri, 16 Oct 2020 19:17:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1602868676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=jdm9mBMxKdAsoQZoFxNOC8jtqNd6+g04OI6FW8Vrk5Y=; b=YUQxCv3PGLWDt620B8RhGog8kqcpQSgAS6BHKsSdm7CYs4RSF4MnrihKDfaV06wCW+bmJY DaR+QnynoGLy5UTdhOIGVcC0+P59DSOYnHJb5NhoFJYlAYJ4ilGt574uPt+JxsCloMZCdI c8CMg+CM5hasWV5dinPLyv57AOsdL4CMn7AOaQ0qDQzLq9oImZ7mUAdSl5IyK/5anMc9EX 4+Q92ZmDhXOz/Abue3FYDmWpi5U4MJNEQcpWvtz7iqptf21BpyevEh13cFn61pDtESOdYW hIbcltReNClY5rhYTnCNvjDnuT1v7HiMS4cKkz++GurxSJrBKVmgBjf+YMLdLA== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id YR94WciNXijk for ; Fri, 16 Oct 2020 19:17:54 +0200 (CEST) Date: Fri, 16 Oct 2020 19:17:53 +0200 From: Lars-Dominik Braun To: guix-patches@gnu.org Subject: [PATCH] Fix xpra HTML server Message-ID: <20201016171753.GB1315@noor.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline X-MBO-SPAM-Probability: X-Rspamd-Score: -6.16 / 15.00 / 15.00 X-Rspamd-Queue-Id: 60BCC182A X-Rspamd-UID: 54882b Received-SPF: pass client-ip=80.241.56.171; envelope-from=lars@6xq.net; helo=mout-p-201.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/16 13:17:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, version 4.0.4 of xpra broke the builtin HTML server, causing ``--html=on`` to display the following error message: 2020-10-16 12:31:01,810 Error: cannot import websocket connection handler: 2020-10-16 12:31:01,810 No module named 'requests' 2020-10-16 12:31:01,810 the html server will not be available The attached patch applies an upstream fix, until upstream releases a new version. Cheers, Lars --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-xpra-Fix-HTML-server.patch" >From a033826b12bd06e523dbe06ad23e6cc62ca18ed6 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 16 Oct 2020 19:15:41 +0200 Subject: [PATCH] gnu: xpra: Fix HTML server * gnu/packages/patches/xpra-4.0.4-norequests.patch: Add file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/xorg.scm (xpra)[patches]: Apply it. --- gnu/local.mk | 1 + .../patches/xpra-4.0.4-norequests.patch | 39 +++++++++++++++++++ gnu/packages/xorg.scm | 3 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/xpra-4.0.4-norequests.patch diff --git a/gnu/local.mk b/gnu/local.mk index d41b65957e..111206f34e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1705,6 +1705,7 @@ dist_patch_DATA = \ %D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \ %D%/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch \ %D%/packages/patches/xpra-4.0.1-systemd-run.patch \ + %D%/packages/patches/xpra-4.0.4-norequests.patch \ %D%/packages/patches/xsane-fix-memory-leak.patch \ %D%/packages/patches/xsane-fix-pdf-floats.patch \ %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ diff --git a/gnu/packages/patches/xpra-4.0.4-norequests.patch b/gnu/packages/patches/xpra-4.0.4-norequests.patch new file mode 100644 index 0000000000..e545be7f1d --- /dev/null +++ b/gnu/packages/patches/xpra-4.0.4-norequests.patch @@ -0,0 +1,39 @@ +Remove python-requests dependency, r27626 upstream. + +--- a/xpra/net/websockets/common.py (revision 27625) ++++ b/xpra/net/websockets/common.py (revision 27626) +@@ -7,7 +7,6 @@ + import uuid + from hashlib import sha1 + from base64 import b64encode +-from requests.structures import CaseInsensitiveDict + + from xpra.os_util import strtobytes, bytestostr, monotonic_time + from xpra.log import Logger +@@ -77,7 +76,7 @@ + for line in lines: + parts = line.split(b": ", 1) + if len(parts)==2: +- headers[parts[0]] = parts[1] ++ headers[parts[0].lower()] = parts[1] + return headers + + def verify_response_headers(headers, key): +@@ -84,14 +83,13 @@ + log("verify_response_headers(%s)", headers) + if not headers: + raise Exception("no http headers found in response") +- headers = CaseInsensitiveDict(headers) +- upgrade = headers.get(b"Upgrade", b"") ++ upgrade = headers.get(b"upgrade", b"") + if upgrade!=b"websocket": + raise Exception("invalid http upgrade: '%s'" % upgrade) +- protocol = headers.get(b"Sec-WebSocket-Protocol", b"") ++ protocol = headers.get(b"sec-websocket-protocol", b"") + if protocol!=b"binary": + raise Exception("invalid websocket protocol: '%s'" % protocol) +- accept_key = headers.get(b"Sec-WebSocket-Accept", b"") ++ accept_key = headers.get(b"sec-websocket-accept", b"") + if not accept_key: + raise Exception("websocket accept key is missing") + expected_key = make_websocket_accept_hash(key) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 0eda94bc47..e912eb1be9 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -6312,7 +6312,8 @@ basic eye-candy effects.") version ".tar.xz")) (sha256 (base32 "10alqdfmgml9ixdi1nyd9xlw8a5q0j8m2sv4g9p83pd6z1a0rpv2")) - (patches (search-patches "xpra-4.0.1-systemd-run.patch")))) + (patches (search-patches "xpra-4.0.1-systemd-run.patch" + "xpra-4.0.4-norequests.patch")))) (build-system python-build-system) ;; see also http://xpra.org/trac/wiki/Dependencies (inputs `( -- 2.26.2 --gBBFr7Ir9EOA20Yy-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 17 16:23:46 2020 Received: (at 44036-done) by debbugs.gnu.org; 17 Oct 2020 20:23:46 +0000 Received: from localhost ([127.0.0.1]:35609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTsju-0005kH-GO for submit@debbugs.gnu.org; Sat, 17 Oct 2020 16:23:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTsjo-0005k0-Ol for 44036-done@debbugs.gnu.org; Sat, 17 Oct 2020 16:23:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33144) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTsji-000387-UB; Sat, 17 Oct 2020 16:23:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40698 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kTsjh-0003Co-Qo; Sat, 17 Oct 2020 16:23:30 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Lars-Dominik Braun Subject: Re: [bug#44036] [PATCH] Fix xpra HTML server References: <20201016171753.GB1315@noor.fritz.box> Date: Sat, 17 Oct 2020 22:23:28 +0200 In-Reply-To: <20201016171753.GB1315@noor.fritz.box> (Lars-Dominik Braun's message of "Fri, 16 Oct 2020 19:17:53 +0200") Message-ID: <87tuus4n5r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44036-done Cc: 44036-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Lars, Lars-Dominik Braun skribis: >>>From a033826b12bd06e523dbe06ad23e6cc62ca18ed6 Mon Sep 17 00:00:00 2001 > From: Lars-Dominik Braun > Date: Fri, 16 Oct 2020 19:15:41 +0200 > Subject: [PATCH] gnu: xpra: Fix HTML server > > * gnu/packages/patches/xpra-4.0.4-norequests.patch: Add file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/xorg.scm (xpra)[patches]: Apply it. Applied, thanks! Ludo=E2=80=99. From unknown Thu Aug 21 12:10:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 15 Nov 2020 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator