From: Haldun Bayhantopcu
Subject: PortableAllegroserve help wanted
Date: 
Message-ID: <d668f875.0402281116.17027456@posting.google.com>
I get an error while trying to handle form data which
comes with POST method, in portableAllegroServe 1.2.12c
on CMUCL 18d on FreeBSD 4.6.

The example code --which comes with portableAllegroServe-- 
also crashes while handling form. 

What is wrong ?

Thanks for help.

HB

Error message is something like:


1-aserve-worker : 02/25/04 - 16:18:39 - while processing command "POST /tform
HTTP/1.1" got error #<Stream for descriptor 6> is not a character input stream.

Example code is:
;;
;; here's a form using the 'post' method
;;
(publish :path "/tform" 
	 :content-type "text/html"
	 :function
	 (let ((name "unknown"))
	   #'(lambda (req ent)
	       (let ((body (get-request-body req)))
		 (format t "got body ~s~%" body)
		 (let ((gotname (assoc "username"
				       (form-urlencoded-to-query body)
					:test #'equal)))
		   (if* gotname
		      then (setq name (cdr gotname)))))
		 
	       (with-http-response (req ent)
		 (with-http-body (req ent)
		   (html (:head (:title "test form"))
			 (:body "Hello " (:princ-safe name) ", "
				"Enter your name: "
				((:form :action "/tform"
					:method "post")
				 ((:input :type "text"
					  :maxlength 10
					  :size 10
					  :name "username"))))))))))

Note :
There happens no error with GET method.
From: Rudi Schlatte
Subject: Re: PortableAllegroserve help wanted
Date: 
Message-ID: <m2ptby9662.fsf@Rudi-Schlattes-Computer.local>
You'll have better luck with the CVS version of paserve; instructions
on how to check it out are at
http://sourceforge.net/cvs/?group_id=32760

Rudi