How to write an HTTP1.1 Proxy using Twisted?

Sha Hua <[email protected]> Mon, 27 Jan 2014 09:58:00 -0800
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAG7x0sHd87A0qO0BV==F3Ey0bLwyOS0NDrw-E1wxRaH7RgStiQ@mail.gmail.com>
Hi all,

I have recently started to learn and use Twisted. The first task is to
write an HTTP proxy.
I found Twisted provides a built-in proxy module described here:

http://twistedmatrix.com/documents/current/web/howto/using-twistedweb.html#auto9

It says the server part inherits http.HTTPChannel, while the client part
inherits http.HTTPClient.

However, as I later find out, *http.HTTPClient is only a HTTP 1.0
client,*which is not enough for my task. I also found there is another
class called *twisted.web.client.Agent
*which seems to be more advanced than http.HTTPClient and supports HTTP 1.1.

Questions:
1. Can twisted.web.client.Agent be used in a Proxy implementation with
http.HTTPChannel? Is there any examples?
2. Does http.HTTPChannel support HTTP 1.1?

Thanks!

Sha

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web