emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/web-server 4edcba2: web-server.el: Special-case NTLM au


From: Thomas Fitzsimmons
Subject: [elpa] externals/web-server 4edcba2: web-server.el: Special-case NTLM authorization
Date: Thu, 18 Feb 2021 17:19:27 -0500 (EST)

branch: externals/web-server
commit 4edcba28826869b07f622fd83f6aab96fd8e4d19
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>

    web-server.el: Special-case NTLM authorization
    
    * web-server.el (ws-parse): Special-case NTLM authorization.
---
 web-server.el | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/web-server.el b/web-server.el
index c536cb5..d05deeb 100644
--- a/web-server.el
+++ b/web-server.el
@@ -183,16 +183,19 @@ function.
       (let ((protocol (to-keyword (match-string 1 string)))
             (credentials (match-string 2 string)))
         (list (cons :AUTHORIZATION
-                    (cons protocol
-                          (cl-case protocol
-                            (:BASIC
-                             (let ((cred (base64-decode-string credentials)))
-                               (if (string-match ":" cred)
-                                   (cons (substring cred 0 (match-beginning 0))
-                                         (substring cred (match-end 0)))
-                                 (ws-error proc "bad credentials: %S" cred))))
-                            (t (ws-error proc "un-support protocol: %s"
-                                         protocol))))))))
+                    (if (eq protocol :NTLM)
+                        string
+                      (cons protocol
+                            (cl-case protocol
+                              (:BASIC
+                               (let ((cred (base64-decode-string credentials)))
+                                 (if (string-match ":" cred)
+                                     (cons (substring cred 0
+                                                      (match-beginning 0))
+                                           (substring cred (match-end 0)))
+                                   (ws-error proc "bad credentials: %S" 
cred))))
+                              (t (ws-error proc "un-support protocol: %s"
+                                           protocol)))))))))
      ;; All other headers
      ((string-match "^\\([^[:space:]]+\\): \\(.*\\)$" string)
       (list (cons (to-keyword (match-string 1 string))



reply via email to

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