Bug in ssl-object library reference page or in ssl-object code?
Grant Edwards
grante at visi.com
Thu May 22 17:00:02 EDT 2008
According to http://docs.python.org/lib/ssl-objects.html
17.2.2 SSL Objects
SSL objects have the following methods.
read([n])
If n is provided, read n bytes from the SSL connection,
otherwise read until EOF. The return value is a string of
the bytes read.
The behavior I observer when n is not provided doesn't agree
with the description. When I call read(), it appears that I
get whatever data is currently available. It does not read
until EOF. This seems to agree with the comment on the
"example" page:
http://docs.python.org/lib/socket-example.html
# Read a chunk of data. Will not necessarily
# read all the data returned by the server.
data = ssl_sock.read()
If read() did indeed read until EOF, then it would always
read all of the data returned by the server.
Is this a bug in the doc or in the code?
--
Grant Edwards grante Yow! How do I get HOME?
at
visi.com
More information about the Python-list
mailing list