--- ..\devel\twisted\web\client.py	2006-07-13 22:13:36.546875000 -0700
+++ twisted\web\client.py	2006-09-16 16:20:56.046875000 -0700
@@ -201,10 +201,11 @@
 
     def __init__(self, url, method='GET', postdata=None, headers=None,
                  agent="Twisted PageGetter", timeout=0, cookies=None,
-                 followRedirect=1):
+                 followRedirect=1, proxy=None):
         self.protocol.followRedirect = followRedirect
         self.timeout = timeout
         self.agent = agent
+        self.proxy = proxy
 
         if cookies is None:
             cookies = {}
@@ -236,7 +237,13 @@
             self.scheme = scheme
             self.host = host
             self.port = port
-        self.path = path
+        if self.proxy:
+            self.path = "%s://%s:%s%s" % (self.scheme,  
+                                          self.host,  
+                                          self.port,  
+                                          path)
+        else:
+            self.path = path
 
     def buildProtocol(self, addr):
         p = protocol.ClientFactory.buildProtocol(self, addr)
@@ -378,7 +385,7 @@
     return scheme, host, port, path
 
 
-def getPage(url, contextFactory=None, *args, **kwargs):
+def getPage(url, contextFactory=None, proxy=None, *args, **kwargs):
     """Download a web page as a string.
 
     Download a page. Return a deferred, which will callback with a
@@ -387,6 +394,10 @@
     See HTTPClientFactory to see what extra args can be passed.
     """
     scheme, host, port, path = _parse(url)
+    if proxy:
+        host, port = proxy.split(':')
+        port = int(port)
+        kwargs['proxy'] = proxy
     factory = HTTPClientFactory(url, *args, **kwargs)
     if scheme == 'https':
         from twisted.internet import ssl
