For Programmers: Free Programming Magazines  


Home > Archive > Lisp > January 2005 > http headers and stream-element-type









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author http headers and stream-element-type
Sam Steingold

2005-01-26, 3:58 pm

the HTTP response to a "GET foo" request consists of headers, blank
line, and data.
it is preferable to parse headers as text (STREAM-ELEMENT-TYPE =
CHARACTER) but sometimes one wants to process data as binary
(STREAM-ELEMENT-TYPE = (UNSIGNED-BYTE 8)).
ACL permits interchangeable READ-LINE and READ-SEQUENCE into a byte
vector on the socket stream.
CLISP has (SETF STREAM-ELEMENT-TYPE).

How about CMUCL, ABCL, LW, MCL &c?

What do you do if you want to mix binary and character i/o on the same
stream?

Thanks.

--
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Two wrongs don't make a right, but three rights make a left.
Edi Weitz

2005-01-26, 3:59 pm

On Wed, 26 Jan 2005 13:05:25 -0500, Sam Steingold <sds@gnu.org> wrote:

> the HTTP response to a "GET foo" request consists of headers, blank
> line, and data. it is preferable to parse headers as text
> (STREAM-ELEMENT-TYPE = CHARACTER) but sometimes one wants to process
> data as binary (STREAM-ELEMENT-TYPE = (UNSIGNED-BYTE 8)). ACL
> permits interchangeable READ-LINE and READ-SEQUENCE into a byte
> vector on the socket stream. CLISP has (SETF STREAM-ELEMENT-TYPE).
>
> How about CMUCL, ABCL, LW, MCL &c?


LispWorks (4.3 and 4.4) also has bivalent streams.

Edi.

--

Lisp is not dead, it just smells funny.

Real email: (replace (subseq "spamtrap@agharta.de" 5) "edi")
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com