summaryrefslogtreecommitdiff
path: root/lisp/gnus/mm-url.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/mm-url.el')
-rw-r--r--lisp/gnus/mm-url.el63
1 files changed, 0 insertions, 63 deletions
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index a0322b00cf3..109bd265faa 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -416,69 +416,6 @@ spaces. Die Die Die."
(autoload 'mml-compute-boundary "mml")
-(defun mm-url-encode-multipart-form-data (pairs &optional boundary)
- "Return PAIRS encoded in multipart/form-data."
- ;; RFC1867
-
- ;; Get a good boundary
- (unless boundary
- (setq boundary (mml-compute-boundary '())))
-
- (concat
-
- ;; Start with the boundary
- "--" boundary "\r\n"
-
- ;; Create name value pairs
- (mapconcat
- 'identity
- ;; Delete any returned items that are empty
- (delq nil
- (mapcar (lambda (data)
- (when (car data)
- ;; For each pair
- (concat
-
- ;; Encode the name
- "Content-Disposition: form-data; name=\""
- (car data) "\"\r\n"
- "Content-Type: text/plain; charset=utf-8\r\n"
- "Content-Transfer-Encoding: binary\r\n\r\n"
-
- (cond ((stringp (cdr data))
- (cdr data))
- ((integerp (cdr data))
- (int-to-string (cdr data))))
-
- "\r\n")))
- pairs))
- ;; use the boundary as a separator
- (concat "--" boundary "\r\n"))
-
- ;; put a boundary at the end.
- "--" boundary "--\r\n"))
-
-(defun mm-url-fetch-form (url pairs)
- "Fetch a form from URL with PAIRS as the data using the POST method."
- (mm-url-load-url)
- (let ((url-request-data (mm-url-encode-www-form-urlencoded pairs))
- (url-request-method "POST")
- (url-request-extra-headers
- '(("Content-type" . "application/x-www-form-urlencoded"))))
- (url-insert-file-contents url)
- (setq buffer-file-name nil))
- t)
-
-(defun mm-url-fetch-simple (url content)
- (mm-url-load-url)
- (let ((url-request-data content)
- (url-request-method "POST")
- (url-request-extra-headers
- '(("Content-type" . "application/x-www-form-urlencoded"))))
- (url-insert-file-contents url)
- (setq buffer-file-name nil))
- t)
-
(defun mm-url-remove-markup ()
"Remove all HTML markup, leaving just plain text."
(goto-char (point-min))