From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: RE: Custom HTTP methods in web module Date: Sat, 23 Mar 2024 19:50:06 +0100 Message-ID: <20240323195006.2Jq52C00K5DtEJR01Jq6FE@laurent.telenet-ops.be> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_9ABD0418-8A1A-4541-BDF5-A5C6F8ADBD18_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31643"; mail-complaints-to="usenet@ciao.gmane.io" To: Ryan Raymond , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Mar 23 19:50:47 2024 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ro6S6-00081t-8Q for guile-devel@m.gmane-mx.org; Sat, 23 Mar 2024 19:50:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ro6Rb-0005OZ-7p; Sat, 23 Mar 2024 14:50:15 -0400 Original-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 1ro6RZ-0005OQ-G2 for guile-devel@gnu.org; Sat, 23 Mar 2024 14:50:13 -0400 Original-Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro6RW-0003iN-Vf for guile-devel@gnu.org; Sat, 23 Mar 2024 14:50:13 -0400 Original-Received: from [IPv6:2a02:1811:8c0e:ef00:e9e7:2ef1:7a03:a748] ([IPv6:2a02:1811:8c0e:ef00:e9e7:2ef1:7a03:a748]) by laurent.telenet-ops.be with bizsmtp id 2Jq52C00K5DtEJR01Jq6FE; Sat, 23 Mar 2024 19:50:06 +0100 Importance: normal X-Priority: 3 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1711219806; bh=PKn6A3sITmi4MAeAV/zY33ailq3/SFxoillfkts/sm4=; h=To:From:Subject:Date:In-Reply-To:References; b=IRyTXWsH0EyKk+dW0tfCuxn52Zq1Wf3s7iFudY/7j3NG9jsLFZlMUagMQk0UW3OgK +vBf959SfXGJJjrfXpSbXxpX24HwBbbEQCQtxOCUj1ZBe6luhngHPfzfJAk/4KFJ/k guSYp4fZPKzMtRuQXD+bf/pe0JkRlO09jGlDKGIkLrNpj3/b28gey2jUd/tEX3PtS0 DTa2e1ZjB42g+D3SBKLmDc4WN5u2itIWBCBeH0kM4vD3sGVZMLq/SkaTw1JTP9q4oB oIqDv6PFZgW4rsjmIgBqJiJkwkM4U0lHt/rzyOAB/EdCPgl/i4kdvoRXrCb0iKnMDE oqS1kBmDx1b3g== Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22365 Archived-At: --_9ABD0418-8A1A-4541-BDF5-A5C6F8ADBD18_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" =C2=A0 =C2=A0(else (bad-request "Invalid method: ~a" (substring str start e= nd))))) Another problem with the old implementation =E2=80=93 AFAICT, this does a = =E2=80=9C400 Bad Request=E2=80=9D. However, at least when the syntax/gramma= r/... is correct, it should be a 501 instead.=20 >An origin server that receives a request method that is unrecognized or no= t implemented=C2=A0SHOULD=C2=A0respond with the=C2=A0501 (Not Implemented)= =C2=A0status code. An origin server that receives a request method that is = recognized and implemented, but not allowed for the target resource,=C2=A0S= HOULD=C2=A0respond with the=C2=A0405 (Method Not Allowed)=C2=A0status code. Given the proposal to (in this procedure) allow all methods (at least all g= rammatical methods) in a new implementation, it seems this won=E2=80=99t be= this method=E2=80=99s responsibility anymore, though. Best regards, Maxime Devos --_9ABD0418-8A1A-4541-BDF5-A5C6F8ADBD18_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"


   (else (bad-request "Invalid m= ethod: ~a" (substring str start end)))))

 

Another problem with the ol= d implementation =E2=80=93 AFAICT, this does a =C2=A0=E2=80=9C400 Bad Reque= st=E2=80=9D. However, at least when the syntax/grammar/... is correct, it s= hould be a 501 instead.

 

>An origin server that receives a= request method that is unrecognized or not implemented SHOULD respond wit= h the 501 (Not Implemented) status code. An origin server that receiv= es a request method that is recognized and implemented, but not allowed for= the target resource, SHOULD respond with the 405 (Method Not Allowed)&nb= sp;status code.

 =

Given the proposal to (in this procedure) allow al= l methods (at least all grammatical methods) in a new implementation, it se= ems this won=E2=80=99t be this method=E2=80=99s responsibility anymore, tho= ugh.

 

Best= regards,

Maxime Devos

 

= --_9ABD0418-8A1A-4541-BDF5-A5C6F8ADBD18_--