guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] web: authorization header scheme should be capitalized


From: Aleix Conchillo Flaqué
Subject: [PATCH] web: authorization header scheme should be capitalized
Date: Thu, 23 Jun 2022 12:15:23 -0700

* 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
index 4276e1744..312c28934 100644
--- a/module/web/http.scm
+++ b/module/web/http.scm
@@ -965,10 +965,10 @@ as an ordered alist."
 (define (write-credentials val port)
   (match val
     (('basic . cred)
-     (put-string port "basic ")
+     (put-string port "Basic ")
      (put-string port cred))
     ((scheme . params)
-     (put-symbol port scheme)
+     (put-string port (string-titlecase (symbol->string scheme)))
      (put-char port #\space)
      (write-key-value-list params port))))
 
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]