This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shajianrui
Recipients shajianrui, vsbogd
Date 2019-06-16.10:28:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560680880.71.0.641198769762.issue37301@roundup.psfhosted.org>
In-reply-to
Content
I have the same problem, and use a similar walk-around:
1. I set the rbufsize to -1
2. I use self.connection.recv instead of self.rfile.read(), like this:
    while select.select([self.connection], [], [], 0)[0]:
        if not self.connection.recv(1):

However, when I go through the code, I find that at line 967 in server.py(I am using python 3.7), there is a comment:
    # Make rfile unbuffered -- we need to read one line and then pass
    # the rest to a subprocess, so we can't use buffered input.
    rbufsize = 0

Seems for some reasons the author set rfile unbuffered, and I know nothing about it.

If you know much about it, please give me some hints, thank you.
History
Date User Action Args
2019-06-16 10:28:00shajianruisetrecipients: + shajianrui, vsbogd
2019-06-16 10:28:00shajianruisetmessageid: <1560680880.71.0.641198769762.issue37301@roundup.psfhosted.org>
2019-06-16 10:28:00shajianruilinkissue37301 messages
2019-06-16 10:28:00shajianruicreate