How do I get my simple twisted proxy to work?
问题 I am attempting to make use of the Twisted.Web framework. Notice the three line comments (#line1, #line2, #line3). I want to create a proxy (gateway?) that will forward a request to one of two servers depending on the url. If I uncomment either comment 1 or 2 (and comment the rest), the request is proxied to the correct server. However, of course, it does not pick the server based on the URL. from twisted.internet import reactor from twisted.web import proxy, server from twisted.web.resource