[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 19/119: simply (name . content) for form elements
From: |
Eric Schulte |
Subject: |
[elpa] 19/119: simply (name . content) for form elements |
Date: |
Mon, 10 Mar 2014 16:57:04 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 7bc9d6476ce78d708c806c2b5f467e9f4a713731
Author: Eric Schulte <address@hidden>
Date: Wed Dec 18 23:00:35 2013 -0700
simply (name . content) for form elements
---
NOTES | 4 ++--
emacs-web-server.el | 3 +--
examples/3-post-echo.el | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/NOTES b/NOTES
index bb1d061..79022cc 100644
--- a/NOTES
+++ b/NOTES
@@ -22,9 +22,9 @@ parse more than just the content-type headers.
** TODO non-multipart form data
e.g., parameter strings
-** TODO some more convenience functionality [1/6]
+** TODO some more convenience functionality [2/6]
- [ ] strip and parse URL query string
-- [ ] think about defaulting to (name . content) for form elements
+- [X] think about defaulting to (name . content) for form elements
- [ ] maybe don't require a non-nil return to cancel the connection,
[ ] rather only keep on an explicit :keep-alive
- [ ] function to send a file (with mime handling)
diff --git a/emacs-web-server.el b/emacs-web-server.el
index 013bec6..6b1e5dd 100644
--- a/emacs-web-server.el
+++ b/emacs-web-server.el
@@ -124,8 +124,7 @@ function.
(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))))
- (cdr dp))))))
+ (ews-trim (substring string (match-end 0)))))))
(defun ews-filter (proc string)
(with-slots (handler clients) (plist-get (process-plist proc) :server)
diff --git a/examples/3-post-echo.el b/examples/3-post-echo.el
index 5f0f932..9aeb79c 100644
--- a/examples/3-post-echo.el
+++ b/examples/3-post-echo.el
@@ -16,7 +16,7 @@
(ews-response-header proc 200 '("Content-type" . "text/plain"))
(process-send-string proc
(if message
- (format "you said %S\n" (cdr (assoc 'content message)))
+ (format "you said %S\n" message)
"This is a POST request, but it has no \"message\".\n"))
:finished)))
((:GET . ".*") .
- [elpa] 11/119: more flexible network process creation, (continued)
- [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, 2014/03/10
- [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 <=
- [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
- [elpa] 23/119: handle close-connection thrown during header parse, Eric Schulte, 2014/03/10
- [elpa] 25/119: seems to be generally usable, added a README, Eric Schulte, 2014/03/10
- [elpa] 24/119: parse application/x-www-form-urlencoded post data, Eric Schulte, 2014/03/10
- [elpa] 26/119: thread proc through some functions, Eric Schulte, 2014/03/10
- [elpa] 28/119: testing a hello-world server, Eric Schulte, 2014/03/10
- [elpa] 27/119: run test processes asynch, Eric Schulte, 2014/03/10
- [elpa] 29/119: update examples, Eric Schulte, 2014/03/10
- [elpa] 31/119: match more HTTP methods, Eric Schulte, 2014/03/10