[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 26/119: thread proc through some functions
From: |
Eric Schulte |
Subject: |
[elpa] 26/119: thread proc through some functions |
Date: |
Mon, 10 Mar 2014 16:57:08 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 1fd8b03177a50537849266a84b7914a2f2a9049b
Author: Eric Schulte <address@hidden>
Date: Thu Dec 19 00:20:29 2013 -0700
thread proc through some functions
---
emacs-web-server.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/emacs-web-server.el b/emacs-web-server.el
index d24da78..dc8188b 100644
--- a/emacs-web-server.el
+++ b/emacs-web-server.el
@@ -101,7 +101,7 @@ function.
(mapc #'delete-process (append (mapcar #'car (clients server))
(list (process server)))))
-(defun ews-parse (string)
+(defun ews-parse (proc string)
(cl-flet ((to-keyword (s) (intern (concat ":" (upcase (match-string 1 s))))))
(cond
((string-match
@@ -133,14 +133,14 @@ function.
(push (cons proc (make-instance 'ews-client)) clients))
(let ((c (cdr (assoc proc clients))))
(when (not (eq (catch 'close-connection
- (if (ews-do-filter c string)
+ (if (ews-do-filter proc c string)
(ews-call-handler proc (cdr (headers c)) handler)
:keep-open))
:keep-open))
(setq clients (assq-delete-all proc clients))
(delete-process proc)))))
-(defun ews-do-filter (client string)
+(defun ews-do-filter (proc client string)
"Return non-nil when finished and the client may be deleted."
(with-slots (leftover boundary headers) client
(let ((pending (concat leftover string))
@@ -179,7 +179,7 @@ function.
(throw 'finished-parsing-headers t)))
;; Standard header parsing.
(:otherwise
- (let ((this (ews-parse (substring pending last-index index))))
+ (let ((this (ews-parse proc (substring pending last-index
index))))
(if (and (caar this) (eql (caar this) :CONTENT-TYPE))
(cl-destructuring-bind (type &rest data)
(mail-header-parse-content-type (cdar this))
- [elpa] 17/119: handling errors, (continued)
- [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
- [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 <=
- [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
- [elpa] 30/119: fleshed out some more tests, Eric Schulte, 2014/03/10
- [elpa] 32/119: url-encoded parameters, Eric Schulte, 2014/03/10
- [elpa] 34/119: found a confounding POST example, Eric Schulte, 2014/03/10
- [elpa] 33/119: ews-subdirectoryp convenience function, Eric Schulte, 2014/03/10
- [elpa] 36/119: bug fix, Eric Schulte, 2014/03/10
- [elpa] 35/119: cleaned up header/param parsing, Eric Schulte, 2014/03/10