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 benjamin.peterson
Recipients benjamin.peterson, giampaolo.rodola, orsenthil
Date 2011-12-09.06:08:50
SpamBayes Score 0.000363485
Marked as misclassified No
Message-id <>
In-reply-to <>
2011/12/8 Giampaolo Rodola' <>:
> Giampaolo Rodola' <> added the comment:
> This is not possible for two reasons:
> - on most POSIX systems, sendfile() works with mmap-like ("regular") files only, while HTTPConnection.send() accepts any file-like object as long as it provides a read() method
> - after read()ing a chunk of data from the file and before send()ing it over the socket, the data can be subject to an intermediate conversion (datablock.encode("iso-8859-1")):
> ...whereas sendfile() can only be used to send a binary file "as-is"

I presume you could check for a binary mode, though? Also, you can
catch EINVAl on invalid fds.
Date User Action Args
2011-12-09 06:08:51benjamin.petersonsetrecipients: + benjamin.peterson, orsenthil, giampaolo.rodola
2011-12-09 06:08:50benjamin.petersonlinkissue13559 messages
2011-12-09 06:08:50benjamin.petersoncreate