From: Christophe Turle
Subject: http proxy in lisp
Date: 
Message-ID: <c7dqnn$d3p$1@amma.irisa.fr>
hi,

is there any lisp code ( as short as possible ) for a http proxy. I'm using cmucl on linux.

(defun launch-proxy ( local-port other-server )
  "all local requests on port 'local-port' are redirected to 'other-server:80' and the response sent back to client"
  ...
 )

thx.

From: Matthew Danish
Subject: Re: http proxy in lisp
Date: 
Message-ID: <20040506171303.GL25328@mapcar.org>
On Thu, May 06, 2004 at 06:53:23PM +0200, Christophe Turle wrote:
> is there any lisp code ( as short as possible ) for a http proxy. I'm using 
> cmucl on linux.

Portable Allegroserve can act as an HTTP proxy server, if I'm not
mistaken.

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: Cameron MacKinnon
Subject: Re: http proxy in lisp
Date: 
Message-ID: <fKqdnY9wEoN06QfdRVn-sQ@golden.net>
Christophe Turle wrote:
> hi,
> 
> is there any lisp code ( as short as possible ) for a http proxy. I'm 
> using cmucl on linux.
> 
> (defun launch-proxy ( local-port other-server )
>  "all local requests on port 'local-port' are redirected to 
> 'other-server:80' and the response sent back to client"
>  ...
> )

I don't have code for you, but if this is your only requirement, it's 
trivial, and requires nothing specific to http. Just open a connection 
to the real server when you get one on the local port, then loop, 
waiting on data or EOF from either connection and sending it to the 
other one.

20 lines?

-- 
Cameron MacKinnon
Toronto, Canada
From: Alex Mizrahi
Subject: Re: http proxy in lisp
Date: 
Message-ID: <2g24phF3l6n4U1@uni-berlin.de>
(message (Hello 'Cameron)
(you :wrote  :on '(Thu, 06 May 2004 13:24:55 -0400))
(

 CM> I don't have code for you, but if this is your only requirement,
 CM> it's  trivial, and requires nothing specific to http. Just open a
 CM> connection  to the real server when you get one on the local port,
 CM> then loop,  waiting on data or EOF from either connection and
 CM> sending it to the  other one.

as i remember, when we did that simple type of proxy - with C socket API -
there was some problems, with that EOF..
possibly that was just a bug in implementation, but that proxy was almost
unusable..

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
(prin1 "Jane dates only Lisp programmers"))
From: Christophe Turle
Subject: Re: http proxy in lisp
Date: 
Message-ID: <c7q0q1$au0$1@amma.irisa.fr>
Cameron MacKinnon wrote:
> Christophe Turle wrote:
> 
>> hi,
>>
>> is there any lisp code ( as short as possible ) for a http proxy. I'm 
>> using cmucl on linux.
>>
>> (defun launch-proxy ( local-port other-server )
>>  "all local requests on port 'local-port' are redirected to 
>> 'other-server:80' and the response sent back to client"
>>  ...
>> )
> 
> 
> I don't have code for you, but if this is your only requirement, it's 
> trivial, and requires nothing specific to http. Just open a connection 
> to the real server when you get one on the local port, then loop, 
> waiting on data or EOF from either connection and sending it to the 
> other one.
> 
> 20 lines?
> 

yes you're right. Easy and very few lines (with cmucl).

thx.