summaryrefslogtreecommitdiffstats
path: root/Misc/ACKS
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-08-24 06:33:33 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-08-24 06:33:33 (GMT)
commit3c0d0baf2badfad7deb346d1043f7d83bb92691f (patch)
tree968ca71729f519aaf6ebb38477efdc73e5ae3ae9 /Misc/ACKS
parenta790fe7ff86f193670b3d8287b22c72cbe675c7b (diff)
downloadcpython-3c0d0baf2badfad7deb346d1043f7d83bb92691f.zip
cpython-3c0d0baf2badfad7deb346d1043f7d83bb92691f.tar.gz
cpython-3c0d0baf2badfad7deb346d1043f7d83bb92691f.tar.bz2
Issue #12319: Support for chunked encoding of HTTP request bodies
When the body object is a file, its size is no longer determined with fstat(), since that can report the wrong result (e.g. reading from a pipe). Instead, determine the size using seek(), or fall back to chunked encoding for unseekable files. Also, change the logic for detecting text files to check for TextIOBase inheritance, rather than inspecting the “mode” attribute, which may not exist (e.g. BytesIO and StringIO). The Content-Length for text files is no longer determined ahead of time, because the original logic could have been wrong depending on the codec and newline translation settings. Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
Diffstat (limited to 'Misc/ACKS')
-rw-r--r--Misc/ACKS1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index 9cc1c1e..46f4ae7 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -795,6 +795,7 @@ Daniel Kozan
Jerzy Kozera
Maksim Kozyarchuk
Stefan Krah
+Rolf Krahl
Bob Kras
Sebastian Kreft
Holger Krekel