• Martin Panter's avatar
    Issue #12319: Support for chunked encoding of HTTP request bodies · 3c0d0baf
    Martin Panter yazdı
    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.
    3c0d0baf
Adı
Son kayıt (commit)
Son güncelleme
..
c-api Loading commit data...
data Loading commit data...
distributing Loading commit data...
distutils Loading commit data...
extending Loading commit data...
faq Loading commit data...
howto Loading commit data...
includes Loading commit data...
install Loading commit data...
installing Loading commit data...
library Loading commit data...
reference Loading commit data...
tools Loading commit data...
tutorial Loading commit data...
using Loading commit data...
whatsnew Loading commit data...
Makefile Loading commit data...
README.txt Loading commit data...
about.rst Loading commit data...
bugs.rst Loading commit data...
conf.py Loading commit data...
contents.rst Loading commit data...
copyright.rst Loading commit data...
glossary.rst Loading commit data...
license.rst Loading commit data...
make.bat Loading commit data...