[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add support for custom user agent strings in url.el
From: |
Vibhav Pant |
Subject: |
Re: [PATCH] Add support for custom user agent strings in url.el |
Date: |
Sun, 19 Jan 2014 15:15:43 +0530 |
Here's the fixed patch. I created a defcustom for the user-agent in url-http.el.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index ac2e140..6a0ec13 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -132,6 +132,15 @@ 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 'string
+ :group 'url)
+
;(eval-when-compile
;; These are all macros so that they are hidden from external sight
;; when the file is byte-compiled.
@@ -214,11 +223,7 @@ request.")
(and (listp url-privacy-level)
(memq 'agent url-privacy-level)))
""
- (format "User-Agent: %sURL/%s\r\n"
- (if url-package-name
- (concat url-package-name "/" url-package-version " ")
- "")
- url-version)))
+ url-user-agent))
(defun url-http-create-request (&optional ref-url)
"Create an HTTP request for `url-http-target-url', referred to by REF-URL."
- [PATCH] Add support for custom user agent strings in url.el, Vibhav Pant, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Bozhidar Batsov, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Vibhav Pant, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Bozhidar Batsov, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el,
Vibhav Pant <=
- Re: [PATCH] Add support for custom user agent strings in url.el, Vibhav Pant, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Vibhav Pant, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Richard Stallman, 2014/01/20
- Re: [PATCH] Add support for custom user agent strings in url.el, Rüdiger Sonderfeld, 2014/01/20
- Re: [PATCH] Add support for custom user agent strings in url.el, Rüdiger Sonderfeld, 2014/01/20
- Re: [PATCH] Add support for custom user agent strings in url.el, Vibhav Pant, 2014/01/20
- Re: [PATCH] Add support for custom user agent strings in url.el, Stefan Monnier, 2014/01/19
- Re: [PATCH] Add support for custom user agent strings in url.el, Lars Ingebrigtsen, 2014/01/19