mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-30 05:41:36 -08:00
fixed read-sequence type error when there are more lack middlewares
Error message: The value [NUMBER] is not of type CHARACTER when setting an element of (ARRAY CHARACTER). Thus, the updated code checks the type of RAW-BODY to decide what to do.
This commit is contained in:
parent
b5fd7e458a
commit
e44d2b247b
1 changed files with 11 additions and 2 deletions
|
|
@ -453,8 +453,17 @@ the contents sent to the brower."
|
||||||
(setf post-data id)))
|
(setf post-data id)))
|
||||||
(when (equal (getf env :content-type)
|
(when (equal (getf env :content-type)
|
||||||
"application/x-www-form-urlencoded")
|
"application/x-www-form-urlencoded")
|
||||||
(setf post-data (make-string (getf env :content-length)))
|
(setf post-data (cond ((eq (class-name (class-of (getf env :raw-body)))
|
||||||
(read-sequence post-data (getf env :raw-body)))
|
'circular-streams:circular-input-stream)
|
||||||
|
(let ((array-buffer (make-array (getf env :content-length)
|
||||||
|
:adjustable t
|
||||||
|
:fill-pointer t)))
|
||||||
|
(read-sequence array-buffer (getf env :raw-body))
|
||||||
|
(flex:octets-to-string array-buffer)))
|
||||||
|
(t
|
||||||
|
(let ((string-buffer (make-string (getf env :content-length))))
|
||||||
|
(read-sequence string-buffer (getf env :raw-body))
|
||||||
|
string-buffer)))))
|
||||||
(cond (long-poll-first
|
(cond (long-poll-first
|
||||||
(let ((id (random-hex-string)))
|
(let ((id (random-hex-string)))
|
||||||
(setf (gethash id *connection-data*) (make-hash-table* :test #'equal))
|
(setf (gethash id *connection-data*) (make-hash-table* :test #'equal))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue