VirtualBox

Changeset 83356 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Mar 20, 2020 9:30:57 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136560
Message:

IPRT/http: When we issue PUT tell curl about the data size when the
body is present. When we add Content-Length outselves (as we do for
signing) and don't tell curl, it ends up sending our artisanal
Content-Length while using chunked encoding, which is an invalid
combination.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/http-curl.cpp

    r83355 r83356  
    36413641                pThis->ReadData.Mem.offMem = 0;
    36423642                rcCurl = rtHttpSetReadCallback(pThis, rtHttpReadData, pThis);
     3643                /* curl will use chunked transfer is it doesn't know the body size */
     3644                if (enmMethod == RTHTTPMETHOD_PUT && CURL_SUCCESS(rcCurl))
     3645                    rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_INFILESIZE_LARGE, cbReqBody);
    36433646            }
    36443647        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette