Should be pretty easy to write one using async thin
(http://github.com/raggi/thin/tree/async_for_rack):
require ''thin''
class HttpProxy
def self.call env
HttpClient.get(env[''REQUEST_URI'']) do |headers, content|
env[''async.callback''].call([
200,
headers,
content
])
end
return Thin::Connection::AsyncResponse
end
end
Thin::Server.start ''localhost'', 8080, HttpProxy
Aman
On Tue, Dec 30, 2008 at 2:36 AM, snacktime <snacktime at gmail.com>
wrote:> I''m looking for a bare bones http proxy I can customize.
I''ve got a few em
> http clients laying around that I''ve used in the past, but
wondered if there
> was something out there actually being used in production that I could use
> as a configurable proxy. It''s for an opensocial container
implementation in
> ruby. I have to inject oauth signatures, rewrite/strip a few headers,
> etc.. Dont'' need support for keep alive, pipelining, multi part,
etc..
>
> Chris
>
> _______________________________________________
> Eventmachine-talk mailing list
> Eventmachine-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/eventmachine-talk
>