[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))))
- [elpa] 03/119: parsing HTTP headers, (continued)
- [elpa] 03/119: parsing HTTP headers, Eric Schulte, 2014/03/10
- [elpa] 01/119: initial commit, echo server working, Eric Schulte, 2014/03/10
- [elpa] 04/119: simple hello world server working, Eric Schulte, 2014/03/10
- [elpa] 05/119: stub out (but don't write any) tests, Eric Schulte, 2014/03/10
- [elpa] 08/119: NOTES file for tasks and notes, Eric Schulte, 2014/03/10
- [elpa] 07/119: TODO: handle post data, Eric Schulte, 2014/03/10
- [elpa] 06/119: helper for HTTP headers, Eric Schulte, 2014/03/10
- [elpa] 09/119: parsing form data in POST, Eric Schulte, 2014/03/10
- [elpa] 11/119: more flexible network process creation, Eric Schulte, 2014/03/10
- [elpa] 10/119: some simple examples, Eric Schulte, 2014/03/10
- [elpa] 15/119: more lenient parsing of multipart forms,
Eric Schulte <=
- [elpa] 12/119: compiling to .elc, Eric Schulte, 2014/03/10
- [elpa] 13/119: tasks, Eric Schulte, 2014/03/10
- [elpa] 18/119: 404 not found helper, Eric Schulte, 2014/03/10
- [elpa] 17/119: handling errors, Eric Schulte, 2014/03/10
- [elpa] 14/119: better requirements for test, Eric Schulte, 2014/03/10
- [elpa] 16/119: tasks, Eric Schulte, 2014/03/10
- [elpa] 20/119: don't require non-nil return to close connection, Eric Schulte, 2014/03/10
- [elpa] 19/119: simply (name . content) for form elements, Eric Schulte, 2014/03/10
- [elpa] 21/119: helper to send a file with mime type, Eric Schulte, 2014/03/10
- [elpa] 22/119: file serving example, Eric Schulte, 2014/03/10