[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


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.


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.

size_t CurlRequest::didReceiveHeader(String&& header)

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


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