[MERGE][1.0][Bug 124089] Add root_client_path parameter to SmartWSGIApp, and use it to translate paths received from clients to local paths.

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Dec 12 13:45:59 GMT 2007


>>>>> "martin" == Martin  <gzlist at googlemail.com> writes:


<snip/>

    martin> Firstly, I couldn't actually branch bzr.dev through
    martin> bzr+http://localhost/ because it choaked with a (10055, 'No buffer
    martin> space available') socket error on the 70MB pack file.

I tried to reproduce it on windows (XP, from sources with a
python identifying itself as Python 2.6 (r25:51908) but couldn't
find the right config to trigger it.

Since that seems easier for both of you, can you please apply the
following patch, run the triggering command with '-Dhttp' and
send me the relevant part of .bzr/log ?

--- bzrlib/transport/http/_urllib2_wrappers.py	2007-12-06 22:46:16 +0000
+++ bzrlib/transport/http/_urllib2_wrappers.py	2007-12-12 09:53:20 +0000
@@ -134,7 +134,15 @@
         """
         if not self.isclosed():
             # Make sure nothing was left to be read on the socket
-            data = self.read(self.length)
+            pending = 0
+            while self.length and self.length > 1024:
+                data = self.read(1024)
+                pending += len(data)
+            if self.length:
+                data = self.read(self.length)
+                pending += len(data)
+            if pending:
+                trace.mutter('%s bytes left on the socket', pending)
             self.close()
 
 
 Vincent



More information about the bazaar mailing list