[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 23/119: handle close-connection thrown during header parse
From: |
Eric Schulte |
Subject: |
[elpa] 23/119: handle close-connection thrown during header parse |
Date: |
Mon, 10 Mar 2014 16:57:06 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 912ad475e497db63396d827dd703ec4929e2f35a
Author: Eric Schulte <address@hidden>
Date: Wed Dec 18 23:46:51 2013 -0700
handle close-connection thrown during header parse
---
emacs-web-server.el | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/emacs-web-server.el b/emacs-web-server.el
index b085723..efcfb5c 100644
--- a/emacs-web-server.el
+++ b/emacs-web-server.el
@@ -131,13 +131,14 @@ function.
(with-slots (handler clients) (plist-get (process-plist proc) :server)
(unless (assoc proc clients)
(push (cons proc (make-instance 'ews-client)) clients))
- (let ((client (cdr (assoc proc clients))))
- (when (ews-do-filter client string)
- (when (not (eq (catch 'close-connection
- (ews-call-handler proc (cdr (headers client))
handler))
- :keep-open))
- (setq clients (assq-delete-all proc clients))
- (delete-process proc))))))
+ (let ((c (cdr (assoc proc clients))))
+ (when (not (eq (catch 'close-connection
+ (if (ews-do-filter 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)
"Return non-nil when finished and the client may be deleted."
- [elpa] 12/119: compiling to .elc, (continued)
- [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
- [elpa] 23/119: handle close-connection thrown during header parse,
Eric Schulte <=
- [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
- [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