• Bill C. Riemers's avatar
    http: fix Content-Length and stream closure issues. · 2c166875
    Bill C. Riemers authored
    Changes:
    1. Don't send Connection: close or Connection: Keep-Alive.
        So we will maintain a persistent connection with HTTP 1.1.
    2. Close the connection if and only if the server does not send
       Connection: close, and a zero length is received indicated by either
       Content-Length: 0 or a 0 length size in the byte range.
    3. Correct i_remaining to deal with file larger than 2GBi.
    4. Update i_remaining in Read and OpenWithCookies.
    5. Use -1 for uninitialized size so we can tell the difference from a
       zero length result.
    Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
    2c166875
http.c 62.3 KB