[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7071410 4/8: Store CONTENT-TYPE header - don't skip it
From: |
Stefan Monnier |
Subject: |
[elpa] master 7071410 4/8: Store CONTENT-TYPE header - don't skip it |
Date: |
Mon, 30 Mar 2020 09:06:29 -0400 (EDT) |
branch: master
commit 7071410964c9bd7bd93ff7896d0065b2ac8d025b
Author: jcaw <address@hidden>
Commit: jcaw <address@hidden>
Store CONTENT-TYPE header - don't skip it
Necessary so that request bodies can be parsed - the programmer needs to
know
the content-type to decode it.
Better to store all headers anyway (don't know what the user will want to do
with them). Don't discard them, even if `web-server` is done with them.
---
web-server.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/web-server.el b/web-server.el
index bd0460c..d02b484 100644
--- a/web-server.el
+++ b/web-server.el
@@ -302,13 +302,13 @@ Return non-nil only when parsing is complete."
;; will require special parsing. Thus we will note
;; the type in the CONTEXT variable for parsing
;; dispatch above.
- (if (and (caar header) (eql (caar header) :CONTENT-TYPE))
- (cl-destructuring-bind (type &rest data)
- (mail-header-parse-content-type (cdar header))
- (setq boundary (cdr (assoc 'boundary data)))
- (setq context (intern (downcase type))))
- ;; All other headers are collected directly.
- (setcdr (last headers) header)))))
+ (when (and (caar header) (eql (caar header) :CONTENT-TYPE))
+ (cl-destructuring-bind (type &rest data)
+ (mail-header-parse-content-type (cdar header))
+ (setq boundary (cdr (assoc 'boundary data)))
+ (setq context (intern (downcase type)))))
+ ;; All other headers are collected directly.
+ (setcdr (last headers) header))))
(setq index tmp)))))
(setf (active request) nil)
nil))
- [elpa] master updated (c7480d7 -> b0d5113), Stefan Monnier, 2020/03/30
- [elpa] master 7110ffa 1/8: Make network processes synchronous, Stefan Monnier, 2020/03/30
- [elpa] master 7071410 4/8: Store CONTENT-TYPE header - don't skip it,
Stefan Monnier <=
- [elpa] master ae2587e 5/8: Extend simple POST test to check content-type and body, Stefan Monnier, 2020/03/30
- [elpa] master e3e2608 6/8: Add test for a simple JSON post, Stefan Monnier, 2020/03/30
- [elpa] master 33afdb4 7/8: Bump version to 0.1.2, Stefan Monnier, 2020/03/30
- [elpa] master b0d5113 8/8: Merge commit '33afdb46e1cd61251736816d965495525b36c9cd', Stefan Monnier, 2020/03/30
- [elpa] master ca7e796 3/8: Add slot for the body of a request, Stefan Monnier, 2020/03/30
- [elpa] master cafa5b7 2/8: In old Emacs, :nowait t (overabundance of caution), Stefan Monnier, 2020/03/30