VirtualBox

Changeset 89725 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jun 15, 2021 11:35:35 PM (3 years ago)
Author:
vboxsync
Message:

IPRT/rest: ociSignRequestEnsureXContentSha256 - Fix assertion that is
no longer true after r142265. For large put/post we sign an empty
body, not the actual (usually very large) body, so don't panic when
cbContent and the content-length headers don't match. bugref:9167,
bugref:9911.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/rest/RTCRestClientApiBaseOci.cpp

    r87303 r89725  
    8080
    8181#ifdef RT_STRICT
    82     const char *pszContentLength = RTHttpGetHeader(hHttp, RT_STR_TUPLE("Content-Length"));
    83     Assert(pszContentLength);
    84     AssertMsg(!pszContentLength || RTStrToUInt64(pszContentLength) == cbContent, ("'%s' vs %RU64\n", pszContentLength, cbContent));
     82    if (cbContent != 0)
     83    {
     84        const char *pszContentLength = RTHttpGetHeader(hHttp, RT_STR_TUPLE("Content-Length"));
     85        Assert(pszContentLength);
     86        AssertMsg(!pszContentLength || RTStrToUInt64(pszContentLength) == cbContent,
     87                  ("'%s' vs %RU64\n", pszContentLength, cbContent));
     88    }
    8589#endif
    8690
Note: See TracChangeset for help on using the changeset viewer.

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