From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iEZjNyEPEGT/cgEASxT56A (envelope-from ) for ; Tue, 14 Mar 2023 07:07:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UMBsNyEPEGQUWAEAauVa8A (envelope-from ) for ; Tue, 14 Mar 2023 07:07:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 676EC26F16 for ; Tue, 14 Mar 2023 07:07:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbxoO-000118-52; Tue, 14 Mar 2023 02:07:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbxoM-000110-V7 for bug-guix@gnu.org; Tue, 14 Mar 2023 02:07:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pbxoM-0005TN-DD for bug-guix@gnu.org; Tue, 14 Mar 2023 02:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pbxoL-0006Tt-RW for bug-guix@gnu.org; Tue, 14 Mar 2023 02:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#62177: [PATCH] [WIP] update node to version 16 Resent-From: "Dr. Arne Babenhauserheide" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 14 Mar 2023 06:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62177 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 62177@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167877397624860 (code B ref -1); Tue, 14 Mar 2023 06:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2023 06:06:16 +0000 Received: from localhost ([127.0.0.1]:36039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbxnZ-0006Sp-DQ for submit@debbugs.gnu.org; Tue, 14 Mar 2023 02:06:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:45384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbxnW-0006Sg-Mr for submit@debbugs.gnu.org; Tue, 14 Mar 2023 02:06:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbxnW-0000y4-7H for bug-guix@gnu.org; Tue, 14 Mar 2023 02:06:10 -0400 Received: from mout.web.de ([212.227.17.11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbxnR-0005Pk-Gv for bug-guix@gnu.org; Tue, 14 Mar 2023 02:06:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1678773963; i=arne_bab@web.de; bh=oiz7CbU//C0u1IpJ97izfoT0imOAMoPxZY0UJ773zLc=; h=X-UI-Sender-Class:From:To:Subject:Date; b=kqwqVMcnYmFM8Yd5tewUgxpkGjMZtdJN/R61GAdpENy/sHD0S+ix0B4u4Xax0Zs70 VmaBtanIrsXFPVF+Xnm6YehiZ3ZTO0Wa4QcWyCUU2ahXgquy40nIsVYDGTVzzyaMLW 5FwzOjPTGPc1bv1T+53wzC2lbyXLUCtXH8LRFwR/Aj2CGqyS4IUe/SEgxQ9UrXArVo MJLTL3sjrDo2CMn23Hy8PaHl7wbEq4A7UVoLgYgv684L4REByGjdD3+q7WrUYFStYk Nj/0Xx7UV9PqfGyjNrLGxD0p5Rw4+I3qWpYvc1u99z+59/cWM3tbuFyQ3IRd6Qh+sz BzhQIbY4XMvSg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from fluss ([84.149.95.143]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MkEhH-1qMbDu0Z4b-00kOdc; Tue, 14 Mar 2023 07:06:03 +0100 User-agent: mu4e 1.8.13; emacs 28.2 From: "Dr. Arne Babenhauserheide" Date: Tue, 14 Mar 2023 07:02:14 +0100 Message-ID: <87h6unc1fb.fsf@web.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Provags-ID: V03:K1:ejIjE6lKSii51A9pVLkgsJst6WRay+mtfYeL6A1T/NzAxllfQZh uP/svToqksrhUMjWyjFnqyHTqmNNAdGlizbxcgocCPb03g1mGUDJwTSACBIS51JXjbFMuIp wDjWwImIPuGJ/n83XwaHDKzCEdK8qwQG05WZ5JaCoCp+CDyXvbTDfG9u9MKbL6ejA9tqmgv aMGs4LVArqpsPrjN7l7fw== UI-OutboundReport: notjunk:1;M01:P0:3MXceFqEEGY=;VoQWs764RGimfxvC67eIKtjxrch fUN2ZtD3Y74t/TkvoCxIsoKaXrT6D0f53dzrq3XQ8d60D8odmNzpfgqA/jV+m9K6JNYVL20MR ywDlqahLi7BnLapHYuyIfy/Qju4viJDuqqMurir/Cmo3rq4CxX1uvQf/pRFmA25uuVzm0gjQP EIWK8umhlF5lXKxdwyUX56j5leSIoxXojSaSQqgCOl9QvQnE7YquSJw1D58J7GzCXZJ4MJ7ie W7Vj1mtO4Qbna44ULqHPH2OW8p+QmpfdsHm+cEC/CNMk3scX0UNvL705rC4nMsJLBWiHsyo+f Y3tMexKcKnGMHY6TtnPRhbgjwD/XvpGfYge0kTcC1tcOV4iDHxZv2zW9F2EWkAGFDsc0BPbA0 lRZiDaeG6rVPwFp4d35Z5RHrVw4ldT+FCfV9xQOwcMZdtLrCNJDyhfwb2P6J3KdSMeLF4qbYh TY/LQ8onEp/xvONaaAcbYGLY0BBwh1FfgCVinNrEDBWYtBAUS0Epq9/3zoNicPE3xYCGYvnUT SVTACF3W3TAIU099u+htVeMe1SirFMQaNDRFj84owlis6W6LY3GeZfEUmBHLZe8riA3qBaid5 tTTWA2nS4mIVMKs0J/vTfD607U1i/KQaJobrpPseq+iQT+LtoILLPlf/QWJ2osnDKIsoVbABt nJU0AGhAIeJMs2qV0O82qq7ojVFSq61+g13F6cxxlGTB6BTFBqtuekNhplJ//VFgvH1rGf06y 1FRd37xvRqBHLl4ksvFTPlb4stSKc5sGyQmu41M/6CeWyZtNsmRKWrumVFxBYA01RCKgClarO fxmQfNzOs9heORWbmBH9VsyJBIdTVPdEUvThEiVzrV+hDhYh9IdsUy++j9gz1FC8p8djEFwrI r6I9on6CfC/T40N2GDVUX2MDROh73IQX302b2uv7g1DaspD5sTzCHnUk3cjELcYpfENC9SIpQ lqBAmg== Received-SPF: pass client-ip=212.227.17.11; envelope-from=arne_bab@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=kqwqVMcn; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=web.de (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678774049; a=rsa-sha256; cv=none; b=Q2d5WAz0AGKDr7z3EFAvzzYNAX51XZhl+0l9CCVfNIq3yPTl+pJj9nsZ+SPeRZfJKKwxYh cLHLrtEnEoY62ZIimrrnsYKBAEh8Zt1OUr+juY0LM0RC7UDdQTDz0JM/Jo9OfxAjojU0Zu LIZpmI9YaVfuzvTomKPyosEuXtN2Kn+rMT35IMIIcq/Tyt+2HRziJXcF+1Xzx0Olteh4ah 6dPhBPBOLPbYq5aEBvDHiOGfRL2Gmp00a6ueIJR4kJcOA6BtonRxa4D1I0MGrQpNckVoYX /x80NWYmK/AyROucZC0X/v5ffBOVozZpKc8T+k53Jn87fKxQzyj2uxeIUjmQEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678774049; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=YdAMZa5wxv6jpnrrOzDpQamcsavpiMQCHt4mfmUeHSQ=; b=gd7xv9H+bUP55LiCNcuXeMw8QNof9+EW5TsMT8L4oRFuPjy5x6RBiPcwmLQL4qwxePv6oB kUv+KW8Eej0/64bixRnIbZ+EXY++c+MYu7DzxHbXssl7rBNSuTx/rRksVkfZZLWrQxgfpt AiSfOwXen7ZVljqKSAFjiMcaZCQXBSpUGJhR2EXkuiKoqG/sDCh0stTBfJZto/8PwNuVbi k6Gqi3z8ogu181RxkTnh9gmEaNANm0suyX1sYDOM/kaW8bZppSKSFCB4/3M3pfQ8Y3ia7e 5CO4sWKpdHiZNYM2TfyL3n7Eea5tL88SHiv6bYDGHqpEmnDDltVc+UMKH36kCA== X-Migadu-Spam-Score: -3.42 X-Spam-Score: -3.42 X-Migadu-Queue-Id: 676EC26F16 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=kqwqVMcn; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=web.de (policy=none) X-TUID: 1CNiQA5k/3jq --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, this is an initial stab at getting node to version 16. It is far from perfect, but I hope it gives someone a good starting point to move forward. The llhttp bootstrap fixes are currently commented out =E2=80=94 I=E2=80=99m not sure what these should be doing and= how they interact with node =E2=80=94 so this cannot be merged as is. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-WIP-try-to-update-node-to-16.19.0.patch Content-Transfer-Encoding: quoted-printable From=2014d58ab181c9087420a5f955d28d72cb086884fc Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Sat, 28 Jan 2023 20:45:16 +0100 Subject: [PATCH] WIP try to update node to 16.19.0 =2D-- gnu/packages/node.scm | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index be39f3b25a..34d13d849c 100644 =2D-- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -668,7 +668,7 @@ (define-public node-llparse-bootstrap (define-public llhttp-bootstrap (package (name "llhttp") =2D (version "2.1.4") + (version "8.1.0") (source (origin (method git-fetch) (uri (git-reference @@ -677,7 +677,7 @@ (define-public llhttp-bootstrap (file-name (git-file-name name version)) (sha256 (base32 =2D "115mwyds9655p76lhglxg2blc1ksgrix6zhigaxnc2q6syy3pa6x")) + "1cq3q3jybibppjhhiymdfmnqgbvn77j7b4ks7lil0lrc3vnnp87f")) (patches (search-patches "llhttp-bootstrap-CVE-2020-8287.pat= ch")) (modules '((guix build utils))) (snippet @@ -738,14 +738,14 @@ (define-public llhttp-bootstrap (define-public node-lts (package (inherit node) =2D (version "14.19.3") + (version "16.19.0") (source (origin (method url-fetch) (uri (string-append "https://nodejs.org/dist/v" version "/node-v" version ".tar.xz")) (sha256 (base32 =2D "15691j5zhiikyamiwwd7f282g6d9acfhq91nrwx54xya38gmpx2w")) + "01k72p0hp4lhlpz1syd9cbkm2gpfww0hn10xdpmzd4i3x8dfq7sg")) (modules '((guix build utils))) (snippet `(begin @@ -808,9 +808,12 @@ (define-public node-lts ;; FIXME: These tests fail in the build container, but they= don't ;; seem to be indicative of real problems in practice. (for-each delete-file =2D '("test/parallel/test-cluster-master-error.js" =2D "test/parallel/test-cluster-master-kill.js")) + '("test/parallel/test-cluster-primary-error.js" + "test/parallel/test-cluster-primary-kill.js")) =20 + ;; requires /bin/sh + (delete-file "test/parallel/test-stdin-from-file-spawn.js") +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ;; These require a DNS resolver. (for-each delete-file '("test/parallel/test-dns.js" @@ -818,8 +821,7 @@ (define-public node-lts =20 ;; These tests require networking. (for-each delete-file =2D '("test/parallel/test-https-agent-unref-socket.= js" =2D "test/parallel/test-corepack-yarn-install.js"= )) + '("test/parallel/test-https-agent-unref-socket.js= ")) =20 ;; This test is timing-sensitive, and fails sporadically on ;; slow, busy, or even very fast machines. @@ -847,21 +849,21 @@ (define-public node-lts ;; TLS certificates that are bundled with the source. We w= ant this ;; package to be reproducible forever, so remove those. ;; TODO: Regenerate certs instead. =2D (for-each delete-file + (for-each (=CE=BB(x)(display x)(delete-file x)) '("test/parallel/test-tls-passphrase.js" "test/parallel/test-tls-server-verify.js")))) (add-after 'delete-problematic-tests 'replace-llhttp-sources =2D (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs #:allow-other-keys) #f)))))) ;; Replace pre-generated llhttp sources =2D (let ((llhttp (assoc-ref inputs "llhttp"))) =2D (copy-file (string-append llhttp "/src/llhttp.c") =2D "deps/llhttp/src/llhttp.c") =2D (copy-file (string-append llhttp "/src/api.c") =2D "deps/llhttp/src/api.c") =2D (copy-file (string-append llhttp "/src/http.c") =2D "deps/llhttp/src/http.c") =2D (copy-file (string-append llhttp "/include/llhttp.h") =2D "deps/llhttp/include/llhttp.h")))))))) + ;;(let ((llhttp (assoc-ref inputs "llhttp"))) + ;; (copy-file (string-append llhttp "/src/llhttp.c") + ;; "deps/llhttp/src/llhttp.c") + ;; (copy-file (string-append llhttp "/src/api.c") + ;; "deps/llhttp/src/api.c") + ;; (copy-file (string-append llhttp "/src/http.c") + ;; "deps/llhttp/src/http.c") + ;; (copy-file (string-append llhttp "/include/llhttp.h") + ;; "deps/llhttp/include/llhttp.h")))))))) (native-inputs (list ;; Runtime dependencies for binaries used as a bootstrap. c-ares-for-node =2D-=20 2.39.2 --=-=-= Content-Type: text/plain Updating llhttp also needs the CVE-2020-8287 patch to be removed (it is fixed upstream). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-do-not-patch-llhttp-bootstrap-CVE-2020-8287-is-f.patch Content-Transfer-Encoding: quoted-printable From=204e9e7905a9a8792b164e96aa31e0dcf3945283d2 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Tue, 14 Mar 2023 06:48:38 +0100 Subject: [PATCH] gnu: do not patch llhttp-bootstrap: CVE-2020-8287 is fixed= in node 16 upstream. =2D-- gnu/local.mk | 1 - gnu/packages/node.scm | 1 - .../llhttp-bootstrap-CVE-2020-8287.patch | 100 ------------------ 3 files changed, 102 deletions(-) delete mode 100644 gnu/packages/patches/llhttp-bootstrap-CVE-2020-8287.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index 403c5f483e..0efa292322 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1492,7 +1492,6 @@ dist_patch_DATA =3D \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ %D%/packages/patches/lirc-localstatedir.patch \ %D%/packages/patches/lirc-reproducible-build.patch \ =2D %D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ %D%/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch \ %D%/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch \ diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 34d13d849c..774c0b3ae8 100644 =2D-- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -678,7 +678,6 @@ (define-public llhttp-bootstrap (sha256 (base32 "1cq3q3jybibppjhhiymdfmnqgbvn77j7b4ks7lil0lrc3vnnp87f")) =2D (patches (search-patches "llhttp-bootstrap-CVE-2020-8287.p= atch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch b/gn= u/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch deleted file mode 100644 index 215c920e53..0000000000 =2D-- a/gnu/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch +++ /dev/null @@ -1,100 +0,0 @@ =2DThis patch comes from upstream. It corresponds to a patch applied to =2Dthe generated C source code for llhttp included in Node.js 14.16.0 =2D(see commit 641f786bb1a1f6eb1ff8750782ed939780f2b31a). That commit =2Dfixes CVE-2020-8287. With this patch, the output of our =2Dllhttp-bootstrap package matches the files included in Node.js 14.16.0 =2Dexactly. =2D =2Dcommit e9b36ea64709c35ca66094d5cf3787f444029601 =2DAuthor: Fedor Indutny =2DDate: Sat Oct 10 19:56:01 2020 -0700 =2D =2D http: unset `F_CHUNKED` on new `Transfer-Encoding` =2D=20=20=20=20 =2D Duplicate `Transfer-Encoding` header should be a treated as a single, =2D but with original header values concatenated with a comma separator.= In =2D the light of this, even if the past `Transfer-Encoding` ended with =2D `chunked`, we should be not let the `F_CHUNKED` to leak into the next =2D header, because mere presence of another header indicates that `chun= ked` =2D is not the last transfer-encoding token. =2D =2Ddiff --git a/src/llhttp/http.ts b/src/llhttp/http.ts =2Dindex f4f1a6e..0a0c365 100644 =2D--- a/src/llhttp/http.ts =2D+++ b/src/llhttp/http.ts =2D@@ -460,11 +460,19 @@ export class HTTP { =2D .match([ ' ', '\t' ], n('header_value_discard_ws')) =2D .otherwise(checkContentLengthEmptiness); =2D=20 =2D+ // Multiple `Transfer-Encoding` headers should be treated as one, b= ut with =2D+ // values separate by a comma. =2D+ // =2D+ // See: https://tools.ietf.org/html/rfc7230#section-3.2.2 =2D+ const toTransferEncoding =3D this.unsetFlag( =2D+ FLAGS.CHUNKED, =2D+ 'header_value_te_chunked'); =2D+ =2D n('header_value_start') =2D .otherwise(this.load('header_state', { =2D [HEADER_STATE.UPGRADE]: this.setFlag(FLAGS.UPGRADE, fallback), =2D [HEADER_STATE.TRANSFER_ENCODING]: this.setFlag( =2D- FLAGS.TRANSFER_ENCODING, 'header_value_te_chunked'), =2D+ FLAGS.TRANSFER_ENCODING, toTransferEncoding), =2D [HEADER_STATE.CONTENT_LENGTH]: n('header_value_content_length_o= nce'), =2D [HEADER_STATE.CONNECTION]: n('header_value_connection'), =2D }, 'header_value')); =2D@@ -847,6 +855,11 @@ export class HTTP { =2D return span.start(span.end(this.node(next))); =2D } =2D=20 =2D+ private unsetFlag(flag: FLAGS, next: string | Node): Node { =2D+ const p =3D this.llparse; =2D+ return p.invoke(p.code.and('flags', ~flag), this.node(next)); =2D+ } =2D+ =2D private setFlag(flag: FLAGS, next: string | Node): Node { =2D const p =3D this.llparse; =2D return p.invoke(p.code.or('flags', flag), this.node(next)); =2Ddiff --git a/test/request/transfer-encoding.md b/test/request/transfer-e= ncoding.md =2Dindex a7d1681..b0891d6 100644 =2D--- a/test/request/transfer-encoding.md =2D+++ b/test/request/transfer-encoding.md =2D@@ -353,6 +353,38 @@ off=3D106 headers complete method=3D3 v=3D1/1 flags= =3D200 content_length=3D0 =2D off=3D106 error code=3D15 reason=3D"Request has invalid `Transfer-Encod= ing`" =2D ``` =2D=20 =2D+## POST with `chunked` and duplicate transfer-encoding =2D+ =2D+ =2D+```http =2D+POST /post_identity_body_world?q=3Dsearch#hey HTTP/1.1 =2D+Accept: */* =2D+Transfer-Encoding: chunked =2D+Transfer-Encoding: deflate =2D+ =2D+World =2D+``` =2D+ =2D+```log =2D+off=3D0 message begin =2D+off=3D5 len=3D38 span[url]=3D"/post_identity_body_world?q=3Dsearch#hey" =2D+off=3D44 url complete =2D+off=3D54 len=3D6 span[header_field]=3D"Accept" =2D+off=3D61 header_field complete =2D+off=3D62 len=3D3 span[header_value]=3D"*/*" =2D+off=3D67 header_value complete =2D+off=3D67 len=3D17 span[header_field]=3D"Transfer-Encoding" =2D+off=3D85 header_field complete =2D+off=3D86 len=3D7 span[header_value]=3D"chunked" =2D+off=3D95 header_value complete =2D+off=3D95 len=3D17 span[header_field]=3D"Transfer-Encoding" =2D+off=3D113 header_field complete =2D+off=3D114 len=3D7 span[header_value]=3D"deflate" =2D+off=3D123 header_value complete =2D+off=3D125 headers complete method=3D3 v=3D1/1 flags=3D200 content_lengt= h=3D0 =2D+off=3D125 error code=3D15 reason=3D"Request has invalid `Transfer-Encod= ing`" =2D+``` =2D+ =2D ## POST with `chunked` before other transfer-coding (lenient) =2D=20 =2D TODO(indutny): should we allow it even in lenient mode? (Consider disab= ling =2D-=20 2.39.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein, ohne es zu merken. draketo.de --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmQQDsoQHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD664rD/sFuUe3EqmYFZ3dkj2232qAnGJQXgck1weI vuwzGKOVTy1DrwakK1uj8X4m5dVd3yUb6yeznr/+2X3EEK5JQK0Oo6i909SeVGbh cniSm+J1gcuJOiCNwFrIzL8pcNV9L0uGzIMilx2xi4yfHMVl1KA/s4luMSgMuIDw nlSXM40CKLMgDR3Avgeo5oe7KO6k4Mda2vwkEEJaNfrtPpgnyedybep1Ou7TwdGy 81+rn62T0kXHJOYb2I2sI1YxL1hbPDDo547UGNKe7ilJk0iQYEZi7j8/8ASgKJr4 du3ESQ2/6XScStmvZ8IsYsJ2XtCL8Nz/eMk/T84yTgPwwe8AHgLF6ElxwvJ77gCA Hkr0P7Fo7rct1N2sJV6BoV5MV3lnLnI7TdpvSRR9c5VxOopBP5OG6F5eWY1G1NTA Axm9w5bRAUuIkA6liGz6eLk5lX93jce4mBJJEdDnltVnJURuo5TpgyiBS3Mp4ozM nUPHQr2Oxn9Thoi9+6wHOufAvm5O2N2PcBHWiBykVgkblBZi8s6yhxR0izl6lvRm djnB+tfYoavrwFA0PwcXT/bFLA7sqqw1Q+qljY3VEqQCmD5jxjOZcMnrcau3ss8D G+qTM7+a3EFQulpLFgZhNx/0vWjzUw3sjYuqIwwaJ70JZiOv4Tx7ZnuPinYNcnsU Oe2q/u4liYjEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmQQDsoQHGFy bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSLt2A/4ug8diHMvTNt+FQwPHecQvO0FS TEeOLIRArcCB1yCFVlssWXpE/1gQM59XGg7WYBMEqd8Mtif+qJTjZ6CTpwxeesWd zUnQTn/IFmd1fwP9/HRZVTsFuTBs/GrrF1DwodkGNyYqnH2MBzV9Yy2wD+sCn+w3 A2Xrjvir8Ou7rYto5A== =r2eL -----END PGP SIGNATURE----- --==-=-=--