Permalink
Browse files

.

  • Loading branch information...
1 parent 0e5bac7 commit bb36defa97565e1ca1121aed8e41199954f4a497 @akkartik akkartik committed May 28, 2012
Showing with 2 additions and 10 deletions.
  1. +2 −10 lib/srv.arc
View
@@ -242,20 +242,12 @@ Connection: close"))
(writeb b str))))
(respond-err str unknown-msg*))))))
-; Could ignore return chars (which come from textarea fields) here by
-; (unless (is c #\return) (push c line))
-
(def handle-post (i o op args n cooks ctype ip)
(if srv-noisy* (pr "Post Contents: "))
(if (no n)
(respond-err o "Post request without Content-Length.")
- (let body nil
- (whilet c (and (> n 0) (readc i))
- (if srv-noisy* (pr c))
- (-- n)
- (push c body))
- (zap string:rev body)
- (if srv-noisy* (pr "\r\n\r\n"))
+ (let body (string:readchars n i)
+ (if srv-noisy* (pr body "\r\n\r\n"))
(respond o op (+ args
(if (~begins downcase.ctype "multipart/form-data")
parseargs.body

0 comments on commit bb36def

Please sign in to comment.