chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] bug in intarweb's request-has-message-body?


From: Brian St. Pierre
Subject: [Chicken-users] bug in intarweb's request-has-message-body?
Date: Tue, 1 Oct 2013 23:33:22 -0400

I was trying to use the default (request-has-message-body?) parameter
to check an incoming request and was getting "bad argument type - not
a structure of the required type".

The code in that parameter's default has the name/headers arguments to
header-contents backwards. The patch below fixes the problem.

--
Brian St. Pierre


Index: intarweb.scm
===================================================================
--- intarweb.scm    (revision 29792)
+++ intarweb.scm    (working copy)
@@ -295,8 +295,8 @@
   (make-parameter
    (lambda (req)
      (let ((headers (request-headers req)))
-       (or (header-contents headers 'content-length)
-           (header-contents headers 'transfer-encoding))))))
+       (or (header-contents 'content-length headers)
+           (header-contents 'transfer-encoding headers))))))

 ;; RFC2616, Section 4.3: "For response messages, whether or not a
 ;; message-body is included with a message is dependent on both the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]