aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-03-01 14:49:26 +1100
committerLars Ingebrigtsen2016-03-01 14:50:01 +1100
commit7c1e6ebfcb98f7936110f581075bff993c64aa18 (patch)
treeeb788d38e99c37a52dd940ab02a423fddf8df890
parentcb1e3da12eb1fcacbf9933ca49a85b6f4116878c (diff)
downloademacs-7c1e6ebfcb98f7936110f581075bff993c64aa18.tar.gz
emacs-7c1e6ebfcb98f7936110f581075bff993c64aa18.zip
Allow binding `url-mime-accept-string'
* lisp/url/url-http.el (url-http): Allow binding `url-mime-accept-string' (bug#22855). Backport: (cherry picked from commit 144bb0cf322b9756d29def3e27a42303e2edce43)
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/url/url-http.el3
2 files changed, 7 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ecbc4ef248e..c9d0b99ba62 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -928,6 +928,10 @@ to specify that we're running in a noninteractive context, and that
928we should not be queried about things like TLS certificate validity. 928we should not be queried about things like TLS certificate validity.
929 929
930--- 930---
931*** `url-mime-accept-string' can now be used as in "interface"
932variable, meaning you can bind it around an `url-retrieve' call.
933
934---
931*** If URL is used with a https connection, the first callback argument 935*** If URL is used with a https connection, the first callback argument
932plist will contain a :peer element that has the output of 936plist will contain a :peer element that has the output of
933`gnutls-peer-status' (if Emacs is built with GnuTLS support). 937`gnutls-peer-status' (if Emacs is built with GnuTLS support).
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index c79e7645d92..5832e92c5a3 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1213,6 +1213,7 @@ overriding the value of `url-gateway-method'."
1213 (and (boundp 'url-http-noninteractive) 1213 (and (boundp 'url-http-noninteractive)
1214 url-http-noninteractive))) 1214 url-http-noninteractive)))
1215 (connection (url-http-find-free-connection host port gateway-method)) 1215 (connection (url-http-find-free-connection host port gateway-method))
1216 (mime-accept-string url-mime-accept-string)
1216 (buffer (or retry-buffer 1217 (buffer (or retry-buffer
1217 (generate-new-buffer 1218 (generate-new-buffer
1218 (format " *http %s:%d*" host port))))) 1219 (format " *http %s:%d*" host port)))))
@@ -1248,6 +1249,7 @@ overriding the value of `url-gateway-method'."
1248 url-http-target-url 1249 url-http-target-url
1249 url-http-no-retry 1250 url-http-no-retry
1250 url-http-connection-opened 1251 url-http-connection-opened
1252 url-mime-accept-string
1251 url-http-proxy)) 1253 url-http-proxy))
1252 (set (make-local-variable var) nil)) 1254 (set (make-local-variable var) nil))
1253 1255
@@ -1265,6 +1267,7 @@ overriding the value of `url-gateway-method'."
1265 url-http-target-url url-current-object 1267 url-http-target-url url-current-object
1266 url-http-no-retry retry-buffer 1268 url-http-no-retry retry-buffer
1267 url-http-connection-opened nil 1269 url-http-connection-opened nil
1270 url-mime-accept-string mime-accept-string
1268 url-http-proxy url-using-proxy) 1271 url-http-proxy url-using-proxy)
1269 1272
1270 (set-process-buffer connection buffer) 1273 (set-process-buffer connection buffer)