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

[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 . ".*") .



reply via email to

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