emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 15/119: more lenient parsing of multipart forms


From: Eric Schulte
Subject: [elpa] 15/119: more lenient parsing of multipart forms
Date: Mon, 10 Mar 2014 16:57:02 +0000

eschulte pushed a commit to branch master
in repository elpa.

commit d027ea069925440170f2fa41ba734e39a43ff297
Author: Eric Schulte <address@hidden>
Date:   Wed Dec 18 19:58:45 2013 -0700

    more lenient parsing of multipart forms
---
 emacs-web-server.el |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/emacs-web-server.el b/emacs-web-server.el
index dbeaf01..4d3bfbe 100644
--- a/emacs-web-server.el
+++ b/emacs-web-server.el
@@ -118,9 +118,8 @@ function.
   string)
 
 (defun ews-parse-multipart/form (string)
-  (when (string-match "[^[:space:]]" string) ; ignore empty
-    (unless (string-match "Content-Disposition:[[:space:]]*\\(.*\\)\r\n" 
string)
-      (error "missing Content-Disposition for multipart/form element."))
+  ;; ignore empty and non-content blocks
+  (when (string-match "Content-Disposition:[[:space:]]*\\(.*\\)\r\n" string)
     (let ((dp (mail-header-parse-content-disposition (match-string 1 string))))
       (cons (cdr (assoc 'name (cdr dp)))
             (cons (cons 'content (ews-trim (substring string (match-end 0))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]