Re: [cl-cookbook-contrib] [ cl-cookbook-Bugs-546193 ] sockets example newline error
Brought to you by:
jthing
From: Lieven M. <ma...@wy...> - 2002-04-20 12:31:00
|
no...@so... writes: > Bugs item #546193, was opened at 2002-04-19 11:30 > You can respond by visiting: > http://sourceforge.net/tracker/?func=detail&atid=447472&aid=546193&group_id=46815 > > Category: None > Group: None > Status: Open > Resolution: None > Priority: 5 > Submitted By: John Wiseman (jjwiseman) > Assigned to: Nobody/Anonymous (nobody) > Summary: sockets example newline error > > Initial Comment: > The sockets http example makes a common mistake by > using read-line for reading lines and ~% to output > newlines. > > HTTP lines are terminated by CR LF. ~% may output LF > on a unix system, CR on a Mac, and CR LF in Windows. > Similarly, read-line will consider a line to be > terminated by diffrent characters or sequences of > characters on different systems. I usually work around this problem by using a MAKE-STREAM-CRLF-ENDED function that is implemented by using MOP and Gray streams. This could make an example for this kind of technique. In general, the cost of network latency makes this efficient enough for clients -- Lieven Marchand <ma...@wy...> She says, "Honey, you're a Bastard of great proportion." He says, "Darling, I plead guilty to that sin." Cowboy Junkies -- A few simple words |