From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] web: send capitalized authorization header scheme Date: Fri, 24 Jun 2022 09:35:43 -0700 Message-ID: References: <20220624160505.18005-1-aconchillo@gmail.com> <69b3c07c82a6c48064439f4179f0861e601decf0.camel@telenet.be> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fd1dd005e2342940" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17216"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jun 24 18:36:35 2022 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 1o4mIM-0004FP-0t for guile-devel@m.gmane-mx.org; Fri, 24 Jun 2022 18:36:34 +0200 Original-Received: from localhost ([::1]:32860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4mIK-0001Aj-5S for guile-devel@m.gmane-mx.org; Fri, 24 Jun 2022 12:36:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4mHl-00018N-Ad for guile-devel@gnu.org; Fri, 24 Jun 2022 12:36:01 -0400 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:33697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4mHj-00016D-Mc for guile-devel@gnu.org; Fri, 24 Jun 2022 12:35:57 -0400 Original-Received: by mail-pf1-x429.google.com with SMTP id n12so3083649pfq.0 for ; Fri, 24 Jun 2022 09:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Q5rHunsFYcHvaP2MQEBS4bHAESDtF0XdKH4NXfuOyM=; b=pCaW3WoLvHYvoU/OjlfSO/KrcW8NFS4awF/2TuOyDAOP3wpwDHtGscog9e8aBojPwl JRcUmWQdZ7ASZgI0Oqwoe8r+gYG8FzPHabsp46u/XxBFvowSxYNo22O/Cb0hhQBWFjKa mtDuNwXkWvFotDIPZBaeBW/FoZYhFexqhIHOS1V8dPsf8qrDIFURF6pIRJ9U4qBO9Rwp zSylv8HQdggqv4OdKXeDcHDPso6W6NEan2mSbpuVU5RwqpT25mXG2T8SrsBA4DDnkQrn Toi1mRs4bK+jV8t0ZWvlJfzOpsRWGH1iuBKlWu5Ll7FYC8Jt/EAZdTwuf3CcAjOOFn3p UCzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Q5rHunsFYcHvaP2MQEBS4bHAESDtF0XdKH4NXfuOyM=; b=aut7HpfSqHlPiOha5qBqj7FWMFOo2ZkLTinC8fFfgl75UY0JvNZhWgSvix4hZkvvXw otFiB0BT/0rzpeWZUtWqIplxUENhFd2dZpHSy9taJqrn/wycgMhJMYbbVwZB8qadSqtD MgCJIeSGhs3iYdOELMABkWrhkHn1jFOyzCqd05aJCFmOWmwEdP81KfzpRc7QP8qbOXxN wQIxwqd2qYeu2jgKg/MfLSCEUkReoXY4C8bx6dqdqk5z2kNYN6j3LA1yEQQnDD0Gnjv/ +JWMrsAce8nbjmEoPu8KuEHVZOhwT3ZeaIr44Im6jEa6K/B/5afJQ4BxpRNEu/SKrOsY 2epQ== X-Gm-Message-State: AJIora9Hf662OqDxPisl7GbIeJICY2X6L8STjw8IQAwP2LgdxsjrZK9D kiM3XBc1igSEJI3CV15BJKpN1/+Uhq4q4kQAzLE44Y3o X-Google-Smtp-Source: AGRyM1s6G9o6jtlrl3OdfqZgTqjgY4C5bAmzQRskhA6tTaNIhdgC8440tL8PpMZPDAt4KB18hadC1eY/PaS9wvzLyuI= X-Received: by 2002:a05:6a00:2484:b0:51c:4ee0:b899 with SMTP id c4-20020a056a00248400b0051c4ee0b899mr46746496pfv.46.1656088554182; Fri, 24 Jun 2022 09:35:54 -0700 (PDT) In-Reply-To: <69b3c07c82a6c48064439f4179f0861e601decf0.camel@telenet.be> Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=aconchillo@gmail.com; helo=mail-pf1-x429.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.lisp.guile.devel:21240 Archived-At: --000000000000fd1dd005e2342940 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 24, 2022 at 9:28 AM Maxime Devos wrote= : > Aleix Conchillo Flaqu=C3=A9 schreef op vr 24-06-2022 om 09:05 [-0700]: > > * module/web/http.scm (write-credentials): capitalize authorization > > header scheme. The standard allows the scheme to be case-insensitive, > > however most libraries out there expect the scheme to be capitalized, > > which is what it is actually used in RFC > > docs (e.g. https://datatracker.ietf.org/doc/html/rfc7617#section-2). > Some > > libraries even reject lowercase scheme making Guile incompatible. > > This comment looks more useful to me to put in the source code, to help > future readers of the source code, otherwise they would have to dig > through the git history. As mentioned previously, this could be > something like: > > ;; While according to RFC 7617 Schemes are case-insensitive: > ;; > ;; =E2=80=98Note that both scheme and parameter names are matched > ;; case-insensitive=E2=80=99 > ;; > ;; some software (*) incorrectly assumes title case for scheme > ;; names, so use the more titlecase. > ;; > ;; (*): See, e.g., > ;; > ;; > > which would also address the issue of not forgetting that Guile's old > behaviour is correct, it's the other party that's not following the > specification. > > This makes sense. I left the comment in the commit log as well. Sent again. Thank you! Aleix --000000000000fd1dd005e2342940 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Jun 24, 2022 at 9:28 AM = Maxime Devos <maximedevos@tele= net.be> wrote:
Aleix Conchillo Flaqu=C3=A9 schreef op vr 24-06-2022 om 09:05 [-0700]= :
> * module/web/http.scm (write-credentials): capitalize authorization > header scheme. The standard allows the scheme to be case-insensitive,<= br> > however most libraries out there expect the scheme to be capitalized,<= br> > which is what it is actually used in RFC
> docs (e.g. https://datatracker.ietf.org/= doc/html/rfc7617#section-2). Some
> libraries even reject lowercase scheme making Guile incompatible.

This comment looks more useful to me to put in the source code, to help
future readers of the source code, otherwise they would have to dig
through the git history.=C2=A0 As mentioned previously, this could be
something like:

=C2=A0 =C2=A0;; While according to RFC 7617 Schemes are case-insensitive: =C2=A0 =C2=A0;;
=C2=A0 =C2=A0;; =E2=80=98Note that both scheme and parameter names are matc= hed
=C2=A0 =C2=A0;; case-insensitive=E2=80=99
=C2=A0 =C2=A0;;
=C2=A0 =C2=A0;; some software (*) incorrectly assumes title case for scheme=
=C2=A0 =C2=A0;; names, so use the more titlecase.
=C2=A0 =C2=A0;;
=C2=A0 =C2=A0;; (*): See, e.g.,
=C2=A0 =C2=A0;; <https://[bug report 1]/>
=C2=A0 =C2=A0;; <https://[bug report 2]/>

which would also address the issue of not forgetting that Guile's old behaviour is correct, it's the other party that's not following the=
specification.


This makes sense. I left the comment in = the commit log as well. Sent again.

Thank you!

Aleix
--000000000000fd1dd005e2342940--