From khalsah at gmail.com Wed Jun 25 01:11:15 2008 From: khalsah at gmail.com (Hargobind Khalsa) Date: Tue, 24 Jun 2008 19:11:15 -0600 Subject: [kpax-devel] KPAX SBCL bug and S-HTTP-SERVER bug with fixes Message-ID: While experimenting with KPAX under SBCL I ran into two problems. I'm quite new to lisp, so I hope my descriptions of the problem make sense. First is that when serving static content the server would fail with a message about not a binary stream. After poking around for a while the problem appears to be in s-sysdeps in the functions start-standard-server and open-socket-stream. In both cases the call to sb-bsd-sockets:socket-make-stream is passed ":element-type 'character" to function properly this needs to be changed to ":element-type :default" (so that sbcl creates a Bivalent stream). Secondly when I ran the kpax examples the css wouldn't show up. The fix to this was simply to add ("css" "text/css") to the list of mime types in s-http-server. -- Hargobind Khalsa From scaekenberghe at common-lisp.net Thu Jun 26 18:56:29 2008 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Thu, 26 Jun 2008 20:56:29 +0200 Subject: [kpax-devel] KPAX SBCL bug and S-HTTP-SERVER bug with fixes In-Reply-To: References: Message-ID: Hi, On 25 Jun 2008, at 03:11, Hargobind Khalsa wrote: > While experimenting with KPAX under SBCL I ran into two problems. > > I'm quite new to lisp, so I hope my descriptions of the problem make > sense. > > First is that when serving static content the server would fail with a > message about not a binary stream. > After poking around for a while the problem appears to be in s-sysdeps > in the functions start-standard-server and open-socket-stream. > In both cases the call to sb-bsd-sockets:socket-make-stream is passed > ":element-type 'character" to function properly this needs to be > changed to ":element-type :default" (so that sbcl creates a Bivalent > stream). I applied this patch, trusting you that it works on SBCL. > Secondly when I ran the kpax examples the css wouldn't show up. The > fix to this was simply to add ("css" "text/css") to the list of mime > types in s-http-server. I applied this patch as well - I assume you are on Windows; the patch is a good idea in any case. Thanks, Sven