[Twisted-web] How to write an HTTP1.1 Proxy using Twisted?
Sha Hua
huasha1985 at gmail.com
Mon Jan 27 10:58:00 MST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-web/attachments/20140127/047521d1/attachment.html>
More information about the Twisted-web
mailing list