Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-24 Thread Aleix Conchillo Flaqué
On Fri, Jun 24, 2022 at 1:35 AM Maxime Devos wrote: > Aleix Conchillo Flaqué schreef op do 23-06-2022 om 18:46 [-0700]: > > Ah, got it. Yes, that would make sense. > > > > I was thinking about it again. I know that Guile complies with the > > standard but since, I would say, capitalized schemes

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-24 Thread Dr. Arne Babenhauserheide
Aleix Conchillo Flaqué writes: > On Thu, Jun 23, 2022 at 3:20 PM Maxime Devos wrote: > > Aleix Conchillo Flaqué schreef op do 23-06-2022 om 14:13 [-0700]: > > > https://community.spotify.com/t5/Spotify-for-Developers/API-Authorization-header-doesn-t-follow-HTTP-spec/m-p/5397381#M4917 > > >

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-24 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 18:46 [-0700]: > Ah, got it. Yes, that would make sense. > > I was thinking about it again. I know that Guile complies with the > standard but since, I would say, capitalized schemes is what most > libraries use, would it make sense to switch to

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
On Thu, Jun 23, 2022 at 3:20 PM Maxime Devos wrote: > Aleix Conchillo Flaqué schreef op do 23-06-2022 om 14:13 [-0700]: > > > https://community.spotify.com/t5/Spotify-for-Developers/API-Authorization-header-doesn-t-follow-HTTP-spec/m-p/5397381#M4917 > > > Also, there's still a potential patch to

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 14:13 [-0700]: > https://community.spotify.com/t5/Spotify-for-Developers/API-Authorization-header-doesn-t-follow-HTTP-spec/m-p/5397381#M4917 > > Also, there's still a potential patch to be had, e.g. you could add > > a test checking that Guile

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
On Thu, Jun 23, 2022 at 1:45 PM Maxime Devos wrote: > Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:42 [-0700]: > > > > [...] > > I think you are right. The spec says clearly that it should be case > > insensitive. > > > > So, disregard this patch. > > TBC, did you encounter problems in

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:42 [-0700]: > > [...] > I think you are right. The spec says clearly that it should be case > insensitive. > > So, disregard this patch. TBC, did you encounter problems in the wild that made you write the patch? Also, there's still a

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
On Thu, Jun 23, 2022 at 1:40 PM Maxime Devos wrote: > Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:27 [-0700]: > > + (put-string port (string-titlecase (symbol->string scheme))) > > I'd add a little explanation in a comment (e.g.: > >;; While according to RFC 7617 Schemes are

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Maxime Devos
Aleix Conchillo Flaqué schreef op do 23-06-2022 om 13:27 [-0700]: > + (put-string port (string-titlecase (symbol->string scheme))) I'd add a little explanation in a comment (e.g.: ;; While according to RFC 7617 Schemes are case-insensitive: ;; ;; ‘Note that both scheme and parameter

Re: [PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
Sorry, forgot to fix tests in my original email. This is actually an important bug fix since some servers won't accept lowercase Authorization header schemes and there's no way around this in Guile, AFAIK. Here are a few RFC where they explicitly mention capitalized strings: "Basic" scheme:

[PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
* module/web/http.scm (write-credentials): capitalize authorization header scheme. See, for example, https://datatracker.ietf.org/doc/html/rfc7617#section-2 --- module/web/http.scm| 4 ++-- test-suite/tests/web-http.test | 7 --- 2 files changed, 6 insertions(+), 5 deletions(-)

[PATCH] web: authorization header scheme should be capitalized

2022-06-23 Thread Aleix Conchillo Flaqué
* module/web/http.scm (write-credentials): capitalize authorization header scheme. See, for example, https://datatracker.ietf.org/doc/html/rfc7617#section-2 --- module/web/http.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/web/http.scm b/module/web/http.scm