Thanks for the tip! It doesn't change anything, though, so I've
debugged this a little bit further. The problem seems to be that the
receiving end (wsgi server) does not see the end of the data:

            socket = environ["wsgi.input"]
            while True:
                sys.stderr.write("before")
                chunk = socket.read(4096)
                sys.stderr.write("after")
                if not chunk:
                    sys.stderr.write("done")
                    break
                sys.stderr.write(chunk)

There is data from the tar file being printed, but in the end it hangs
in the 'before' statement, and never gets to 'done'. I tried flushing
the fileobj created by makefile(), but that doesn't seem to help.
There is also no environ["CONTENT_LENGTH"] that I can use to detect
the end of the stream.

I'm probably missing something basic here...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to