• 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
..
__init__.py Loading commit data...
error.py Loading commit data...
parse.py Loading commit data...
request.py Loading commit data...
response.py Loading commit data...
robotparser.py Loading commit data...