Index: web/client.py
===================================================================
--- web/client.py	(revision 16940)
+++ web/client.py	(working copy)
@@ -34,12 +34,20 @@
 
     def connectionMade(self):
         method = getattr(self.factory, 'method', 'GET')
-        self.sendCommand(method, self.factory.path)
+        addr = (self.factory.host, self.factory.port)
+        if getattr(self.transport, 'addr', addr) == addr:
+            getpath = self.factory.path
+        else:
+            getpath = "%s://%s:%s%s" % (self.factory.scheme,
+                                        self.factory.host,
+                                        self.factory.port,
+                                        self.factory.path)
+        self.sendCommand(method, getpath)
         self.sendHeader('Host', self.factory.headers.get("host", self.factory.host))
         self.sendHeader('User-Agent', self.factory.agent)
         if self.factory.cookies:
             l=[]
-            for cookie, cookval in self.factory.cookies.items():  
+            for cookie, cookval in self.factory.cookies.items():
                 l.append('%s=%s' % (cookie, cookval))
             self.sendHeader('Cookie', '; '.join(l))
         data = getattr(self.factory, 'postdata', None)
Index: web/http.py
===================================================================
--- web/http.py	(revision 16940)
+++ web/http.py	(working copy)
@@ -559,10 +559,14 @@
 
         self.method, self.uri = command, path
         self.clientproto = version
-        x = self.uri.split('?')
+        
+        if '://' in path:
+            path = '/'+path.split('/', 3)[-1]
+        
+        x = path.split('?')
 
         if len(x) == 1:
-            self.path = self.uri
+            self.path = path
         else:
             if len(x) != 2:
                 log.msg("May ignore parts of this invalid URI: %s"
@@ -597,7 +601,7 @@
                         self.channel.transport.loseConnection()
                         return
                     raise
-
+        
         self.process()
 
     def __repr__(self):
Index: web/proxy.py
===================================================================
--- web/proxy.py	(revision 16940)
+++ web/proxy.py	(working copy)
@@ -113,7 +113,7 @@
             headers['host'] = host
         self.content.seek(0, 0)
         s = self.content.read()
-        clientFactory = class_(self.method, rest, self.clientproto, headers,
+        clientFactory = class_(self.method, self.uri, self.clientproto, headers,
                                s, self)
         reactor.connectTCP(host, port, clientFactory)
 
