]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/url-http-ntlm/url-http-ntlm.el
url-http-ntlm.el: Bump version to 2.0.1
[gnu-emacs-elpa] / packages / url-http-ntlm / url-http-ntlm.el
index 026a7391208aedcee1840da271a72312a73dce55..a1e1663b86e2174ee588682412560201a3329983 100644 (file)
@@ -1,12 +1,13 @@
 ;;; url-http-ntlm.el --- NTLM authentication for the url library
 
-;; Copyright (C) 2008, 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2016 Free Software Foundation, Inc.
 
 ;; Author: Tom Schutzer-Weissmann <tom.weissmann@gmail.com>
 ;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
+;; Version: 2.0.1
 ;; Keywords: comm, data, processes, hypermedia
 ;; Homepage: https://code.google.com/p/url-http-ntlm/
-;; Package-Requires: ((ntlm "2.0.0"))
+;; Package-Requires: ((cl-lib "0.5") (ntlm "2.0.0"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -40,6 +41,7 @@
 ;;; Code:
 (require 'url-auth)
 (require 'url-http)
+(require 'url-util)
 (require 'mail-parse)
 (require 'cl-lib)
 (require 'ntlm)
@@ -146,9 +148,15 @@ response's \"WWW-Authenticate\" header, munged by
         (auth-header      (assoc "Authorization" url-http-extra-headers))
         (case-fold-search t)
         stage)
+    (url-debug 'url-http-ntlm "Buffer: %s" (current-buffer))
+    (url-debug 'url-http-ntlm "Arguments: %s" args)
+    (url-debug 'url-http-ntlm "Previous arguments: %s" url-http-ntlm--last-args)
     (if (eq args (car url-http-ntlm--last-args))
        ;; multiple calls, return the same argument we returned last time
-       (cdr url-http-ntlm--last-args)
+       (progn
+         (url-debug 'url-http-ntlm "Returning previous result: %s"
+                    (cdr url-http-ntlm--last-args))
+         (cdr url-http-ntlm--last-args))
       (let ((stage
             (cond ((and auth-header (string-match response-rxp
                                                   (cdr auth-header)))
@@ -259,6 +267,7 @@ the server's last response.  These are used by
   (url-http-ntlm--ensure-keepalive)
   (let* ((user-url (url-http-ntlm--ensure-user url))
         (stage (url-http-ntlm--get-stage args)))
+    (url-debug 'url-http-ntlm "Stage: %s" stage)
     (cl-case stage
       ;; NTLM Type 1 message: the request
       (:request