Skip to content
This repository
Browse code

.

  • Loading branch information...
commit bb36defa97565e1ca1121aed8e41199954f4a497 1 parent 0e5bac7
Kartik Agaram authored May 28, 2012

Showing 1 changed file with 2 additions and 10 deletions. Show diff stats Hide diff stats

  1. 12  lib/srv.arc
12  lib/srv.arc
@@ -242,20 +242,12 @@ Connection: close"))
242 242
                      (writeb b str))))
243 243
              (respond-err str unknown-msg*))))))
244 244
 
245  
-; Could ignore return chars (which come from textarea fields) here by
246  
-; (unless (is c #\return) (push c line))
247  
-
248 245
 (def handle-post (i o op args n cooks ctype ip)
249 246
   (if srv-noisy* (pr "Post Contents: "))
250 247
   (if (no n)
251 248
     (respond-err o "Post request without Content-Length.")
252  
-    (let body nil
253  
-      (whilet c (and (> n 0) (readc i))
254  
-        (if srv-noisy* (pr c))
255  
-        (-- n)
256  
-        (push c body))
257  
-      (zap string:rev body)
258  
-      (if srv-noisy* (pr "\r\n\r\n"))
  249
+    (let body (string:readchars n i)
  250
+      (if srv-noisy* (pr body "\r\n\r\n"))
259 251
       (respond o op (+ args
260 252
                        (if (~begins downcase.ctype "multipart/form-data")
261 253
                          parseargs.body

0 notes on commit bb36def

Please sign in to comment.
Something went wrong with that request. Please try again.