From: news.freeserve.com
Subject: HTTP GET from Common LISP ?
Date: 
Message-ID: <cmm58j$d9r$1@news8.svr.pol.co.uk>
It's some 8 years since I last worked on a LISP project, so I'm afraid I 
feel a bit of a newbie all over again.

I want to do an HTTP GET and/ or HTTP POSTto a URL and return the resulting 
web page as a string. The URL may or may not be via SSL (HTTPS).

Whats the best way to do this? Is there a "standard" way to do this - i.e. a 
way that will work across several of the LISP implementations (Particularly 
CLISP and Allegro) ?

Any information gratefully received,

Rob Blackwell 

From: Sam Steingold
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <uhdo1wc8t.fsf@gnu.org>
> * news.freeserve.com <·············@njf.arg> [2004-11-07 21:49:05 +0000]:
>
> I want to do an HTTP GET and/ or HTTP POSTto a URL and return the
> resulting web page as a string. The URL may or may not be via SSL
> (HTTPS).
>
> Whats the best way to do this? Is there a "standard" way to do this -
> i.e. a way that will work across several of the LISP implementations
> (Particularly CLISP and Allegro) ?

See macro CLOCC/CLLIB/url.lisp:WITH-OPEN-URL.
http://clocc.sf.net
http://clocc.sourceforge.net/dist/cllib.html
http://clocc.sourceforge.net/clocc/src/cllib/url.lisp

-- 
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>
A poet who reads his verse in public may have other nasty habits.
From: Rob Blackwell
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <cmodr8$g1d$1@newsg2.svr.pol.co.uk>
Sam,

Thanks for your prompt response.

I've successfully downloaded and installed clocc in /usr/local/src (I'm 
running debian, so I wonder whether there was a way to do it with apt-get 
instead?)

Anyway, I've updated my .clisprc to

(setq *clocc-root* "/usr/local/src/clocc/")
(load (concatenate 'string *clocc-root* "clocc"))
(load (translate-logical-pathname "clocc:src;cllib;base"))
(load (translate-logical-pathname "clocc:src;cllib;url"))

And I'm up and running, but now I seem to have a problem

(cllib:with-open-url (sock (cllib:url "http://localhost/"))
 (dotimes (i 10) (print (read-line sock))))

seems to work, but the following doesn't return anything

(cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
 (dotimes (i 10) (print (read-line sock))))

It seems that every external site I try doesn't work. There's no problem 
with Internet connectivity otherwise - browsers etc are working fine.

I also tried these without success.

(cllib:url-send-mail (cllib:url ·····················@aws.net"))

*** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
·····················@aws.net"


(cllib:whois "aws.net")
Opening URL: `whois://rs.internic.net/aws.net'...

*** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
"whois://rs.internic.net/aws.net"

Clearly I'm doing something stupid, so please excuse my ignorance. Is there 
a primer or any documentation that I should be referring to?

Thanks

Rob.

"Sam Steingold" <···@gnu.org> wrote in message ··················@gnu.org...
>> * news.freeserve.com <·············@njf.arg> [2004-11-07 21:49:05 +0000]:
>>
>> I want to do an HTTP GET and/ or HTTP POSTto a URL and return the
>> resulting web page as a string. The URL may or may not be via SSL
>> (HTTPS).
>>
>> Whats the best way to do this? Is there a "standard" way to do this -
>> i.e. a way that will work across several of the LISP implementations
>> (Particularly CLISP and Allegro) ?
>
> See macro CLOCC/CLLIB/url.lisp:WITH-OPEN-URL.
> http://clocc.sf.net
> http://clocc.sourceforge.net/dist/cllib.html
> http://clocc.sourceforge.net/clocc/src/cllib/url.lisp
>
> -- 
> 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>
> A poet who reads his verse in public may have other nasty habits. 
From: Sam Steingold
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <ufz3krnbl.fsf@gnu.org>
> * Rob Blackwell <·············@njf.arg> [2004-11-08 18:27:45 +0000]:
>
> Thanks for your prompt response.
you are welcome.

> I've successfully downloaded and installed clocc in /usr/local/src
> (I'm running debian, so I wonder whether there was a way to do it with
> apt-get instead?)

dunno, sorry.

> (cllib:with-open-url (sock (cllib:url "http://localhost/"))
>  (dotimes (i 10) (print (read-line sock))))
>
> seems to work, but the following doesn't return anything
>
> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>  (dotimes (i 10) (print (read-line sock))))

WFM:

[21]> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
 (dotimes (i 10) (print (read-line sock))))

[OPEN-URL]GET / HTTP/1.0
[OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
[OPEN-URL]Host: sourceforge.net
[OPEN-URL]Accept: */*
[OPEN-URL]Connection: close
[OPEN-URL]<terpri>

"Date: Mon, 08 Nov 2004 22:17:27 GMT" 
"Server: Apache/1.3.31 (Unix) PHP/4.3.9 mod_ssl/2.8.19 OpenSSL/0.9.7a" 
"X-Powered-By: PHP/4.3.9" 
"ETag: \"jpd-201941186.40588\"" 
"Connection: close" 
"Content-Type: text/html" 
"" 
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" 
"" 
"<!-- Server: sf-web1 -->" 
NIL
[22]> 

could you please be more specific as to the symptoms?
does it print anything at all?
does it hang?

> I also tried these without success.
>
> (cllib:url-send-mail (cllib:url ·····················@aws.net"))
>
> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
> ·····················@aws.net"

> (cllib:whois "aws.net")
> Opening URL: `whois://rs.internic.net/aws.net'...
>
> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
> "whois://rs.internic.net/aws.net"

what is your platform?
what do you have in

#+unix "/etc/services"
#+(or win32 mswindows) (concatenate 'string (getenv "windir")
                                     "/system32/drivers/etc/services"

(see PORT/net.lisp:socket-service-port)




> Is there a primer or any documentation that I should be referring to?

no, but there will be one if you write it ;-)

-- 
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>
If Perl is the solution, you're solving the wrong problem. - Erik Naggum
From: Rob Blackwell
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <cmou4o$ub9$1@newsg2.svr.pol.co.uk>
Sam,

Its a Debian Sarge GNU/Linux system

···@mercury:~$ clisp --version
GNU CLISP 2.33.2 (2004-06-02) (built 3301489576) (memory 3308644476)
Software: GNU C 3.3.4 (Debian 1:3.3.4-2) ANSI C program
Features:
(ASDF SYSCALLS CLX-ANSI-COMMON-LISP CLX REGEXP CLOS LOOP COMPILER CLISP 
ANSI-CL
 COMMON-LISP LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES
 SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 UNIX)
Installation directory: /usr/lib/clisp/
User language: ENGLISH
Machine: I686 (I686) localhost [127.0.0.1]

/etc/services looks pretty standard to me - It lists all the IANA well known 
port numbers and includes entries for the following (amongst lots of 
others).

....
whois           43/tcp          nicname
...
www             80/tcp          http            # WorldWideWeb HTTP
www             80/udp                          # HyperText Transfer
...

When I try the example from CLISP

(cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
 (dotimes (i 10) (print (read-line sock))))

[OPEN-URL]GET / HTTP/1.0
[OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
[OPEN-URL]Host: sourceforge.net
[OPEN-URL]Accept: */*
[OPEN-URL]Connection: close
[OPEN-URL]<terpri>

Then nothing else comes back, not even a toploop - If I leave it a while it 
looks like it retries, and I get the above 6 lines again.

Rob.

"Sam Steingold" <···@gnu.org> wrote in message ··················@gnu.org...
>> * Rob Blackwell <·············@njf.arg> [2004-11-08 18:27:45 +0000]:
>>
>> Thanks for your prompt response.
> you are welcome.
>
>> I've successfully downloaded and installed clocc in /usr/local/src
>> (I'm running debian, so I wonder whether there was a way to do it with
>> apt-get instead?)
>
> dunno, sorry.
>
>> (cllib:with-open-url (sock (cllib:url "http://localhost/"))
>>  (dotimes (i 10) (print (read-line sock))))
>>
>> seems to work, but the following doesn't return anything
>>
>> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>>  (dotimes (i 10) (print (read-line sock))))
>
> WFM:
>
> [21]> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
> (dotimes (i 10) (print (read-line sock))))
>
> [OPEN-URL]GET / HTTP/1.0
> [OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
> [OPEN-URL]Host: sourceforge.net
> [OPEN-URL]Accept: */*
> [OPEN-URL]Connection: close
> [OPEN-URL]<terpri>
>
> "Date: Mon, 08 Nov 2004 22:17:27 GMT"
> "Server: Apache/1.3.31 (Unix) PHP/4.3.9 mod_ssl/2.8.19 OpenSSL/0.9.7a"
> "X-Powered-By: PHP/4.3.9"
> "ETag: \"jpd-201941186.40588\""
> "Connection: close"
> "Content-Type: text/html"
> ""
> "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"
> ""
> "<!-- Server: sf-web1 -->"
> NIL
> [22]>
>
> could you please be more specific as to the symptoms?
> does it print anything at all?
> does it hang?
>
>> I also tried these without success.
>>
>> (cllib:url-send-mail (cllib:url ·····················@aws.net"))
>>
>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for
>> ·····················@aws.net"
>
>> (cllib:whois "aws.net")
>> Opening URL: `whois://rs.internic.net/aws.net'...
>>
>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for
>> "whois://rs.internic.net/aws.net"
>
> what is your platform?
> what do you have in
>
> #+unix "/etc/services"
> #+(or win32 mswindows) (concatenate 'string (getenv "windir")
>                                     "/system32/drivers/etc/services"
>
> (see PORT/net.lisp:socket-service-port)
>
>
>
>
>> Is there a primer or any documentation that I should be referring to?
>
> no, but there will be one if you write it ;-)
>
> -- 
> 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>
> If Perl is the solution, you're solving the wrong problem. - Erik Naggum 
From: GP lisper
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <1099958197.u9fX0AVvRA20ZkgOrzuGsA@teranews>
On Mon, 8 Nov 2004 23:00:15 -0000, <·············@aws.net> wrote:
> When I try the example from CLISP
>
> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>  (dotimes (i 10) (print (read-line sock))))
>
> [OPEN-URL]GET / HTTP/1.0
> [OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
> [OPEN-URL]Host: sourceforge.net
> [OPEN-URL]Accept: */*
> [OPEN-URL]Connection: close
> [OPEN-URL]<terpri>
>
> Then nothing else comes back, not even a toploop - If I leave it a while it 
> looks like it retries, and I get the above 6 lines again.


Sounds like a puzzle for 'Ethereal', watch a manual connect and then
via with-open-url.  Usually the problem resolves quickly once you can
see what isn't happening.


-- 
Brownian motion is correctly colored.
From: Sam Steingold
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <uk6svt0hn.fsf@gnu.org>
> * Rob Blackwell <·············@njf.arg> [2004-11-08 23:00:15 +0000]:
>
>>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for
>>> ·····················@aws.net"

this problem should be fixed in the CVS now.
thanks!

> When I try the example from CLISP
>
> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>  (dotimes (i 10) (print (read-line sock))))
>
> [OPEN-URL]GET / HTTP/1.0
> [OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
> [OPEN-URL]Host: sourceforge.net
> [OPEN-URL]Accept: */*
> [OPEN-URL]Connection: close
> [OPEN-URL]<terpri>
>
> Then nothing else comes back, not even a toploop - If I leave it a
> while it looks like it retries, and I get the above 6 lines again.

please try this:

(cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
  (print sock)
  (ext:socket-shutdown sock :output)
  (print sock)
  (dotimes (i 10) (print (read-line sock))))

I am lost as to the possible reasons for the broken behavior you
observe.  monitoring network with ethereal (as "GP lisper" suggested)
might help...

-- 
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>
MS: our tomorrow's software will run on your tomorrow's HW at today's speed.
From: Rob Blackwell
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <cmrhp6$1c1$1@newsg2.svr.pol.co.uk>
Sam,

Okay I tred your suggestion, but the results are the same - please see 
below.

I've not used ethereal before, but I'll take a look

Thanks, Rob

[1]> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
(print sock)
(ext:socket-stream-shutdown sock :output)
(print sock)
(dotimes (i 10) (print (read-line sock)))
)
[CLLIB:OPEN-URL]GET / HTTP/1.0
[CLLIB:OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
[CLLIB:OPEN-URL]Host: sourceforge.net
[CLLIB:OPEN-URL]Accept: */*
[CLLIB:OPEN-URL]Connection: close
[CLLIB:OPEN-URL]<terpri>


but

Break 3 [4]> (cllib:with-open-url (sock (cllib:url "http://localhost/"))
(print sock)
(ext:socket-stream-shutdown sock :output)
(print sock)
(dotimes (i 10) (print (read-line sock)))
)
[CLLIB:OPEN-URL]GET / HTTP/1.0
[CLLIB:OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
[CLLIB:OPEN-URL]Host: localhost
[CLLIB:OPEN-URL]Accept: */*
[CLLIB:OPEN-URL]Connection: close
[CLLIB:OPEN-URL]<terpri>

#<IO UNBUFFERED SOCKET-STREAM CHARACTER localhost:80>
#<INPUT UNBUFFERED SOCKET-STREAM CHARACTER localhost:80>
"Date: Tue, 09 Nov 2004 18:27:34 GMT"
"Server: Apache/1.3.31 (Debian GNU/Linux)"
"Last-Modified: Tue, 26 Oct 2004 15:33:07 GMT"
"ETag: \"333a8-36-417e6e33\""
"Accept-Ranges: bytes"
"Content-Length: 54"
"Connection: close"
"Content-Type: text/html; charset=iso-8859-1"
""
"<h1>Mercury</h1>"
NIL
Break 3 [4]>

"Sam Steingold" <···@gnu.org> wrote in message ··················@gnu.org...
>> * Rob Blackwell <·············@njf.arg> [2004-11-08 23:00:15 +0000]:
>>
>>>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for
>>>> ·····················@aws.net"
>
> this problem should be fixed in the CVS now.
> thanks!
>
>> When I try the example from CLISP
>>
>> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>>  (dotimes (i 10) (print (read-line sock))))
>>
>> [OPEN-URL]GET / HTTP/1.0
>> [OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
>> [OPEN-URL]Host: sourceforge.net
>> [OPEN-URL]Accept: */*
>> [OPEN-URL]Connection: close
>> [OPEN-URL]<terpri>
>>
>> Then nothing else comes back, not even a toploop - If I leave it a
>> while it looks like it retries, and I get the above 6 lines again.
>
> please try this:
>
> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>  (print sock)
>  (ext:socket-shutdown sock :output)
>  (print sock)
>  (dotimes (i 10) (print (read-line sock))))
>
> I am lost as to the possible reasons for the broken behavior you
> observe.  monitoring network with ethereal (as "GP lisper" suggested)
> might help...
>
> -- 
> 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>
> MS: our tomorrow's software will run on your tomorrow's HW at today's 
> speed. 
From: Sam Steingold
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <ufz3hsq1p.fsf@gnu.org>
Rob,
thanks for your patience,

> * Rob Blackwell <·············@njf.arg> [2004-11-09 22:53:22 +0000]:
>
> [1]> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
> (print sock)
> (ext:socket-stream-shutdown sock :output)
> (print sock)
> (dotimes (i 10) (print (read-line sock)))
> )
> [CLLIB:OPEN-URL]GET / HTTP/1.0
> [CLLIB:OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
> [CLLIB:OPEN-URL]Host: sourceforge.net
> [CLLIB:OPEN-URL]Accept: */*
> [CLLIB:OPEN-URL]Connection: close
> [CLLIB:OPEN-URL]<terpri>

does it hang here ?
could you please type "Ctrl-C" and look at the stack? (:bt)
I wonder in which function it sits...


-- 
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>
Any connection between your reality and mine is purely coincidental.
From: GP lisper
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <1099958391.e2TjiGYTU5jABj9SvBL4iQ@teranews>
On Mon, 08 Nov 2004 17:24:46 -0500, <···@gnu.org> wrote:
>> * Rob Blackwell <·············@njf.arg> [2004-11-08 18:27:45 +0000]:
>>
>> Thanks for your prompt response.
> you are welcome.
>
>> I've successfully downloaded and installed clocc in /usr/local/src
>> (I'm running debian, so I wonder whether there was a way to do it with
>> apt-get instead?)
>
> dunno, sorry.
>
>> (cllib:with-open-url (sock (cllib:url "http://localhost/"))
>>  (dotimes (i 10) (print (read-line sock))))
>>
>> seems to work, but the following doesn't return anything
>>
>> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>>  (dotimes (i 10) (print (read-line sock))))
>
> WFM:
>
> [21]> (cllib:with-open-url (sock (cllib:url "http://sourceforge.net/"))
>  (dotimes (i 10) (print (read-line sock))))
>
> [OPEN-URL]GET / HTTP/1.0
> [OPEN-URL]User-Agent: CLOCC/CLLIB/url.lisp (CLISP)
> [OPEN-URL]Host: sourceforge.net
> [OPEN-URL]Accept: */*
> [OPEN-URL]Connection: close
> [OPEN-URL]<terpri>
>
> "Date: Mon, 08 Nov 2004 22:17:27 GMT" 
> "Server: Apache/1.3.31 (Unix) PHP/4.3.9 mod_ssl/2.8.19 OpenSSL/0.9.7a" 
> "X-Powered-By: PHP/4.3.9" 
> "ETag: \"jpd-201941186.40588\"" 
> "Connection: close" 
> "Content-Type: text/html" 
> "" 
> "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" 
> "" 
> "<!-- Server: sf-web1 -->" 
> NIL
> [22]> 
>
> could you please be more specific as to the symptoms?
> does it print anything at all?
> does it hang?
>
>> I also tried these without success.
>>
>> (cllib:url-send-mail (cllib:url ·····················@aws.net"))
>>
>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
>> ·····················@aws.net"
>
>> (cllib:whois "aws.net")
>> Opening URL: `whois://rs.internic.net/aws.net'...
>>
>> *** - [CLLIB:URL-GET-PORT] Cannot guess the port for 
>> "whois://rs.internic.net/aws.net"
>
> what is your platform?
> what do you have in
>
> #+unix "/etc/services"
> #+(or win32 mswindows) (concatenate 'string (getenv "windir")
>                                      "/system32/drivers/etc/services"
>
> (see PORT/net.lisp:socket-service-port)
>
>
>
>
>> Is there a primer or any documentation that I should be referring to?
>
> no, but there will be one if you write it ;-)
>


-- 
Brownian motion is correctly colored.
From: Edi Weitz
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <ullddfgin.fsf@agharta.de>
On Sun, 7 Nov 2004 21:49:05 -0000, "news.freeserve.com" <·············@aws.net> wrote:

> It's some 8 years since I last worked on a LISP project, so I'm
> afraid I feel a bit of a newbie all over again.
>
> I want to do an HTTP GET and/ or HTTP POSTto a URL and return the
> resulting web page as a string. The URL may or may not be via SSL
> (HTTPS).
>
> Whats the best way to do this? Is there a "standard" way to do this
> - i.e. a way that will work across several of the LISP
> implementations (Particularly CLISP and Allegro) ?

You can do this with the client functions in (Portable)
AllegroServe.[1] An example can be found here:

  <http://groups.google.com/groups?selm=u7jpuiahq.fsf%40agharta.de&output=gplain>

Cheers,
Edi.

[1] <http://www.cliki.net/AllegroServe>

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Rob Blackwell
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <cmou4o$ub9$2@newsg2.svr.pol.co.uk>
Ed,

Thanks - this seems to work with HTTP, but not with HTTPS

(net.aserve.client:do-http-request "https://www.aws.net")

** - Continuable Error
FUNCALL: undefined function ACL-COMPAT.SOCKET::MAKE-SSL-CLIENT-STREAM
If you continue (by typing 'continue'): Retry
The following restarts are also available:
STORE-VALUE    :R1
You may input a new value for (FDEFINITION
 'ACL-COMPAT.SOCKET::MAKE-SSL-CLIENT-STREAM).
USE-VALUE      :R2
You may input a value to be used instead of (FDEFINITION
 'ACL-COMPAT.SOCKET::MAKE-SSL-CLIENT-STREAM).

Maybe its because it needs cl-ssl? Unfortunately that has a dependency on 
cl-uffi which doesnt seem to work with clisp (?)

Maybe I should just buy Allegro?

Rob.

"Edi Weitz" <········@agharta.de> wrote in message 
··················@agharta.de...
> On Sun, 7 Nov 2004 21:49:05 -0000, "news.freeserve.com" 
> <·············@aws.net> wrote:
>
>> It's some 8 years since I last worked on a LISP project, so I'm
>> afraid I feel a bit of a newbie all over again.
>>
>> I want to do an HTTP GET and/ or HTTP POSTto a URL and return the
>> resulting web page as a string. The URL may or may not be via SSL
>> (HTTPS).
>>
>> Whats the best way to do this? Is there a "standard" way to do this
>> - i.e. a way that will work across several of the LISP
>> implementations (Particularly CLISP and Allegro) ?
>
> You can do this with the client functions in (Portable)
> AllegroServe.[1] An example can be found here:
>
> 
> <http://groups.google.com/groups?selm=u7jpuiahq.fsf%40agharta.de&output=gplain>
>
> Cheers,
> Edi.
>
> [1] <http://www.cliki.net/AllegroServe>
>
> -- 
>
> Lisp is not dead, it just smells funny.
>
> Real email: (replace (subseq ·········@agharta.de" 5) "edi") 
From: Brian Downing
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <o9Tjd.588132$8_6.91773@attbi_s04>
In article <············@newsg2.svr.pol.co.uk>,
Rob Blackwell <·············@aws.net> wrote:
> Maybe its because it needs cl-ssl? Unfortunately that has a dependency on 
> cl-uffi which doesnt seem to work with clisp (?)
> 
> Maybe I should just buy Allegro?

That is an option, but if it's a Debian system like you suggest you
should try SBCL and/or CMUCL to see if they fit your needs.

(caveat: SBCL and CMUCL only run on a subset of Debian platforms.  SBCL
runs on x86, PPC, Sparc, Alpha, and MIPS.  See
http://www.sbcl.org/platform-table.html for more information.)

Since both of these implementations have native compilers they will be
quite a bit faster than CLISP for most operations as well.

-bcd
-- 
*** Brian Downing <bdowning at lavos dot net> 
From: Daniel Barlow
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <87pt2ma7ye.fsf@noetbook.telent.net>
"Rob Blackwell" <·············@aws.net> writes:

> Thanks - this seems to work with HTTP, but not with HTTPS
>
> Maybe its because it needs cl-ssl? Unfortunately that has a dependency on 
> cl-uffi which doesnt seem to work with clisp (?)

I would guess so.

Depending on your needs, you might find that asomething like stunnel 
(an sslifying port forwarder) will do the trick without splashing out
on Allegro - obviously it's more use when talking to a single site
than it would be for connecting to arbitrary hosts.

stunnel is at http://www.stunnel.org/ but there are also prebuilt
debian packages.


-dan

-- 
"please make sure that the person is your friend before you confirm"
From: Joerg Hoehle
Subject: Re: HTTP GET from Common LISP ?
Date: 
Message-ID: <u3bz56b9a.fsf@users.sourceforge.net>
"Rob Blackwell" <·············@aws.net> writes:
> (net.aserve.client:do-http-request "https://www.aws.net")
> ** - Continuable Error
> FUNCALL: undefined function ACL-COMPAT.SOCKET::MAKE-SSL-CLIENT-STREAM

> Maybe its because it needs cl-ssl? Unfortunately that has a dependency on 
> cl-uffi which doesnt seem to work with clisp (?)

You're invited to check out my "try-it-out preliminary UFFI support"
for CLISP and report (here, in clisp-users, uffi-users or directly to
me) if you can or not get cl-ssl to run with that.

http://sourceforge.net/tracker/index.php?func=detail&aid=1028683&group_id=1355&atid=301355
It's in the Patches section of CLISP on sourceforge.

I've had no feedback on this UFFI for CLISP code. Maybe people are
just waiting for the "release" word to try it out?

Regards,
	Jorg Hohle
Telekom/T-Systems Technology Center