X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fmm-url.el;h=109bd265faac13ac5b78005ae2393bb80bf448c6;hp=a0322b00cf344ee44495fa989a5fe3353c3c13c4;hb=992509a3574f9add376cc480db9bb5656285bd5b;hpb=c54845f946c28e8361dc77fb09a873d72b69f967 diff --git a/lisp/mm-url.el b/lisp/mm-url.el index a0322b00c..109bd265f 100644 --- a/lisp/mm-url.el +++ b/lisp/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))