From: Janne Rinta-M. <rin...@cs...> - 2001-07-14 20:02:15
|
I was playing with CLLIB/URL (CMUCL 18c) and had a couple of problems. First there was a problem with a call to mesg in url-ask: the ~? directive wants a control string and a list as arguments, but req is a list that has both of them. (See the diff at the end.) Next problem was that the opened URLs didn't work :) This was traced down to sockets, which could be opened and read from, but writing to them wasn't seen by the other end. For this I had two solutions, :buffering :line in port:open-socket and finish-output in cllib:url-ask. Which one is the right one? --- net.lisp.orig Sat Jul 14 21:21:56 2001 +++ net.lisp Sat Jul 14 21:23:49 2001 @@ -122,6 +122,7 @@ port host :element-type (if bin '(unsigned-byte 8) 'character)) #+cmu (sys:make-fd-stream (ext:connect-to-inet-socket host port) + :buffering :line :input t :output t :element-type (if bin '(unsigned-byte 8) 'character)) #+gcl (si:make-socket-stream host port bin) ; FIXME --- url.lisp.orig Sat Jul 14 18:35:14 2001 +++ url.lisp Sat Jul 14 22:30:09 2001 @@ -425,8 +425,8 @@ (declare (type socket sock) (type (or null stream) out) (type (or (unsigned-byte 10) symbol list) end)) (when req - (apply #'format sock req) (fresh-line sock) - (mesg :log out "~&url-ask[~s]: `~?'~%" end req)) + (apply #'format sock req) (fresh-line sock) (finish-output sock) + (mesg :log out "~&url-ask[~s]: `~?'~%" end (car req) (cdr req))) (loop :with endl :of-type list =3D (typecase end (integer (to-list end)) (list end) --=20 Janne Rinta-M=E4nty |