]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-http.el
Merge emacs-25 into master (using imerge)
[gnu-emacs] / lisp / url / url-http.el
index 258f8025662ae5342e26bdd84d051095f98652bc..36cc2f32bbcd3be3aba4c89076c6fc71921b897d 100644 (file)
@@ -136,17 +136,6 @@ request.")
     (507 insufficient-storage            "Insufficient storage"))
   "The HTTP return codes and their text.")
 
-(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
-                                 (if url-package-name
-                                     (concat url-package-name "/"
-                                             url-package-version " ")
-                                   "") url-version)
-  "User Agent used by the URL package."
-  :type '(choice (string :tag "A static User-Agent string")
-                 (function :tag "Call a function to get the User-Agent string"))
-  :version "25.1"
-  :group 'url)
-
 ;(eval-when-compile
 ;; These are all macros so that they are hidden from external sight
 ;; when the file is byte-compiled.
@@ -433,7 +422,7 @@ Return the number of characters removed."
        (progn
          (widen)
          (goto-char (point-max))
-         (insert "<hr>Sorry, but I do not know how to handle " type
+         (insert "<hr>Sorry, but I do not know how to handle " (or type auth url "")
                  " authentication.  If you'd like to write it,"
                  " please use M-x report-emacs-bug RET.<hr>")
           ;; We used to set a `status' var (declared "special") but I can't
@@ -988,7 +977,7 @@ the callback to be triggered."
            (url-http-activate-callback)))))
 
 (defun url-http-chunked-encoding-after-change-function (st nd length)
-  "Function used when dealing with 'chunked' encoding.
+  "Function used when dealing with chunked encoding.
 Cannot give a sophisticated percentage, but we need a different
 function to look for the special 0-length chunk that signifies
 the end of the document."
@@ -1069,7 +1058,7 @@ the end of the document."
                  (when (looking-at "\r?\n")
                    (url-http-debug "Removing terminator of last chunk")
                    (delete-region (match-beginning 0) (match-end 0)))
-                 (if (re-search-forward "^\r*$" nil t)
+                 (if (re-search-forward "^\r?\n" nil t)
                      (url-http-debug "Saw end of trailers..."))
                  (if (url-http-parse-headers)
                      (url-http-activate-callback))))))))))