diff options
| author | Lars Ingebrigtsen | 2016-03-01 14:49:26 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-03-01 14:49:26 +1100 |
| commit | 144bb0cf322b9756d29def3e27a42303e2edce43 (patch) | |
| tree | d2e09175c914fe80faaaf59a0abc7c6dc4d57a9c | |
| parent | 65fa442f2bae42d3f9b06264ca432073ee3197c3 (diff) | |
| download | emacs-144bb0cf322b9756d29def3e27a42303e2edce43.tar.gz emacs-144bb0cf322b9756d29def3e27a42303e2edce43.zip | |
Allow binding `url-mime-accept-string'
* lisp/url/url-http.el (url-http): Allow binding
`url-mime-accept-string' (bug#22855).
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 3 |
2 files changed, 7 insertions, 0 deletions
| @@ -1102,6 +1102,10 @@ to specify that we're running in a noninteractive context, and that | |||
| 1102 | we should not be queried about things like TLS certificate validity. | 1102 | we should not be queried about things like TLS certificate validity. |
| 1103 | 1103 | ||
| 1104 | --- | 1104 | --- |
| 1105 | *** `url-mime-accept-string' can now be used as in "interface" | ||
| 1106 | variable, meaning you can bind it around an `url-retrieve' call. | ||
| 1107 | |||
| 1108 | --- | ||
| 1105 | *** If URL is used with a https connection, the first callback argument | 1109 | *** If URL is used with a https connection, the first callback argument |
| 1106 | plist will contain a :peer element that has the output of | 1110 | plist will contain a :peer element that has the output of |
| 1107 | `gnutls-peer-status' (if Emacs is built with GnuTLS support). | 1111 | `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 d49e527fe4b..33f6d11eef3 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -1210,6 +1210,7 @@ The return value of this function is the retrieval buffer." | |||
| 1210 | (and (boundp 'url-http-noninteractive) | 1210 | (and (boundp 'url-http-noninteractive) |
| 1211 | url-http-noninteractive))) | 1211 | url-http-noninteractive))) |
| 1212 | (connection (url-http-find-free-connection host port gateway-method)) | 1212 | (connection (url-http-find-free-connection host port gateway-method)) |
| 1213 | (mime-accept-string url-mime-accept-string) | ||
| 1213 | (buffer (or retry-buffer | 1214 | (buffer (or retry-buffer |
| 1214 | (generate-new-buffer | 1215 | (generate-new-buffer |
| 1215 | (format " *http %s:%d*" host port))))) | 1216 | (format " *http %s:%d*" host port))))) |
| @@ -1245,6 +1246,7 @@ The return value of this function is the retrieval buffer." | |||
| 1245 | url-http-target-url | 1246 | url-http-target-url |
| 1246 | url-http-no-retry | 1247 | url-http-no-retry |
| 1247 | url-http-connection-opened | 1248 | url-http-connection-opened |
| 1249 | url-mime-accept-string | ||
| 1248 | url-http-proxy)) | 1250 | url-http-proxy)) |
| 1249 | (set (make-local-variable var) nil)) | 1251 | (set (make-local-variable var) nil)) |
| 1250 | 1252 | ||
| @@ -1262,6 +1264,7 @@ The return value of this function is the retrieval buffer." | |||
| 1262 | url-http-target-url url-current-object | 1264 | url-http-target-url url-current-object |
| 1263 | url-http-no-retry retry-buffer | 1265 | url-http-no-retry retry-buffer |
| 1264 | url-http-connection-opened nil | 1266 | url-http-connection-opened nil |
| 1267 | url-mime-accept-string mime-accept-string | ||
| 1265 | url-http-proxy url-using-proxy) | 1268 | url-http-proxy url-using-proxy) |
| 1266 | 1269 | ||
| 1267 | (set-process-buffer connection buffer) | 1270 | (set-process-buffer connection buffer) |