[Lispweb] encoding error on stream
rm@fabula.de
rm at fabula.de
Tue May 10 07:56:16 CDT 2005
On Mon, May 09, 2005 at 03:22:18PM -0500, Alan Shields wrote:
> Hey folks,
>
> An issue has cropped up that I'm not quite sure how to deal with.
>
> I'm trying to send a JPEG as a response in araneida. I've been doing
> this for a while. However, with SBCL 0.9.0, I started getting this
> error:
>
> "encoding error on stream"
Welcome to the club ;-/
> Turns out that the element-type of the request-stream is now character,
> which kicks out any non-ASCII.
??? are you shure about the non-ASCII part?
> I may be stuck in the wrong mindset, but
> I can't think of how to handle this from a handle-request-response - I
> don't think I can change the element type of a stream, can I?
Well, that's the core of the problem (you should find a lot of references
to this by goolging or searching through the meme archive of #lisp :)
HTTP streams can (and often are) streams with changing :external-format.
The first line of both a request and a response has to be 7-bit ASCII, the
rest is open (and, in case of a multipart mime request it might have several
external formats). Standard Common Lisp's streams aren't really designed for
this. I think Cyrus Harmon writes a bit about Araneida/SBCL-Unicode on his
website (http://www.cyrusharmon.org/).
HTH Ralf Mattes
>
> Any help would be appreciated,
> Alan Shields
> _______________________________________________
> Lispweb mailing list
> Lispweb at red-bean.com
> http://www.red-bean.com/mailman/listinfo/lispweb
More information about the lispweb
mailing list