Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Updated (and fixed) web.lsp escape characters and CONTENT-LENGTH

with an awesome patch from Kirill Miazine.
  • Loading branch information...
commit 5954314a8b93b08c8c23471a3fd1d6273125571b 1 parent e2bb587
Kanen Flowers authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 web.lsp
10 web.lsp
@@ -170,9 +170,9 @@
;; double quotes, ampersands, and left and right angle brackets
;; ('&quot;', '&apos;', '&amp;', '&lt;', and '&gt;').</p>
(define (escape str)
+ (replace {&} str {&amp;})
(replace {"} str {&quot;})
(replace {'} str {&apos;})
- (replace {&} str {&amp;})
(replace {<} str {&lt;})
(replace {>} str {&gt;})
@@ -674,11 +674,9 @@
(if-not (context? CGI)
;; CGI module not present; read and parse the POST data ourselves
(let ((post "") (buffer ""))
- (unless (zero? (peek (device)))
- (while (read-buffer (device) buffer POST_LIMIT)
- (write-buffer post buffer)))
- (setf POST (when post (parse-query post))))
+ (if (true? (env "CONTENT_LENGTH"))
+ (read (device) post (integer (env "CONTENT_LENGTH"))))
+ (setf POST (when post (parse-query post))))
;This will replace the above line once mim-decode actually works.
;(setf POST
Please sign in to comment.
Something went wrong with that request. Please try again.