[tbnl-devel] setting non-string cookies?

Zach Beane xach at xach.com
Sat Aug 28 19:26:36 UTC 2004


I just started using tbnl. I am using TBNL 0.2.9, mod_lisp 2.38,
Apache 1.3.31, and SBCL 0.8.13.80. To test things, I created a small
page function:

   (defun xach-test ()
     (no-cache)
     (set-cookie "USERID" :value 1)
     (format nil "Testing, set cookie ~A" (cookie-in "USERID")))

I added this to the dispatch table with:

   (push (create-prefix-dispatcher "/username" 'xach-test) *dispatch-table*)

However, when I visited http://website/username, there was a delay of
several seconds and then a blank page was shown. This showed up in the
logs:

   [Sat Aug 28 15:12:06 2004] [warn] Could not send complete body to
   client, closing socket to Lisp

I changed the number 1 to the string "1", and the page came back
immediately with the expected answer.

The documentation says that cookie values are printed as with PRINC
when sending to the client. Does that mean that the number 1 should
work fine? If so, any thoughts on why it gives the blank page and
error log message?

Zach





More information about the Tbnl-devel mailing list