[Webkit-unassigned] [Bug 272445] [Win] Some http tests are failing with libcurl 8.7.1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 15 02:05:37 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=272445

Kenji Shukuwa <kenji.shukuwa at open-tec.co.jp> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenji.shukuwa at open-tec.co.j
                   |                            |p

--- Comment #2 from Kenji Shukuwa <kenji.shukuwa at open-tec.co.jp> ---
The problem has been occurring since the following PR was merged.

https://github.com/curl/curl/pull/13134

In the current WebKit code, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T is retrieved when the header is received, but since the above commit, it returns -1, which causes the tests to fail.

https://github.com/WebKit/WebKit/blob/8d7eceb1f07dd13e4e2195f14d02fc27489a87a9/Source/WebCore/platform/network/curl/CurlRequest.cpp#L320-L321
---
size_t CurlRequest::didReceiveHeader(String&& header)
{
    ...


    if (auto length = m_curlHandle->getContentLength())
        m_response.expectedContentLength = *length;

    ...
}
---

https://github.com/WebKit/WebKit/blob/8d7eceb1f07dd13e4e2195f14d02fc27489a87a9/Source/WebCore/platform/network/curl/CurlContext.cpp#L731-L742
---
std::optional<long long> CurlHandle::getContentLength()
{
    if (!m_handle)
        return std::nullopt;

    curl_off_t contentLength;
    CURLcode errorCode = curl_easy_getinfo(m_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &contentLength);
    if (errorCode != CURLE_OK)
        return std::nullopt;

    return contentLength;
}
---

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240415/39f7075a/attachment-0001.htm>


More information about the webkit-unassigned mailing list