[Prev][Next][Index][Thread]

Re: cl-http/client/client.lisp on ACL/SunOS



That's right.

The upcoming pre-release of CL-HTTP will provide a prototype of
INVOKE-HTTP-SERVICE-ON-HOST inspired from the MCL code.
However, the current functions on all ports didn't seem
ready to support access from an Intranet to the Web
through proxy gateways. The ACL port now makes an attempt
to providing proxy tunneling. Also it may be important
not to hack HTTP requests in your code but to rely instead
on the CL-HTTP substrate to formulate the proper queries to other hosts.
Otherwise, your hacks will likely break as you start walking
on the Web and access various server implementations some
even providing HTTP/1.1...

Olivier

Kelly Murray wrote:
> 
> > I'm trying to get enough of the cl-http loaded to run client.lisp.
> > However, I'm beginning to suspect that the function
> > INVOKE-HTTP-SERVICE-ON-HOST may not be ported to ACL.
> 
> This is correct.  Here is the ACL Unix implementation-specific
> function you can use to implement it.  This code clip is doing just
> the simple HTTP GET:
> 
> (defun download-url (url)
>    (let ((stream  (ipc::open-network-stream
>                        :element-type '(unsigned-byte 8)
>                        :host (url::host-string url)
>                        :port (or (url::host-port url) 80))))
>     (format stream "GET ~A~%" (url::relative-name-string url))
>     (force-output stream)
>     (setf html (read-html-into-string stream))
>     (close stream)
>     html))
> 
> Hope that helps --kelly murray  kem@franz.com


References: