Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
akkartik committed May 28, 2012
1 parent 0e5bac7 commit bb36def
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/srv.arc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb36def

Please sign in to comment.