Senthil Kumaran <orsent...@gmail.com> added the comment: On Wed, Dec 01, 2010 at 10:06:25AM +0000, Antoine Pitrou wrote: > + try: > + self.sock.sendall(data) > > Indentation problem here.
I could notice it now. Shall fix it. > > + if isinstance(data,str): > + content_length = len(data) > > I'm not sure I understand. What does sending an unicode string mean? That's my mistake with understanding, I just realized (again) that socket.send, socket.sendall does only bytes. And we don't encode the unicode code string to send as bytes too. > + def iterable_body(): > + yield "one" > + yield "two" > + yield "three" > > Iterables of strings? this doesn't seem supported in the patch. It should be: + yield b"one" + yield b"two" + yield b"three" ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com