Bug 272445

Summary: [Win] Some http tests are failing with libcurl 8.7.1
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, kenji.shukuwa, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Fujii Hironori
Reported 2024-04-10 00:10:22 PDT
Some http tests are failing with WebKitRequirements v2024.04.03 on my PC. However, the WinCairo buildbot doesn't fail. WebKitRequirements v2024.04.03 https://github.com/WebKitForWindows/WebKitRequirements/releases/tag/v2024.04.03 > Library Current Previous > c-ares 1.28.1 1.28.0 > curl 8.7.1 8.6.0 Regressions: Unexpected text-only failures (4) http/tests/inspector/network/resource-sizes-network.html [ Failure ] http/tests/xmlhttprequest/onabort-response-getters.html [ Failure ] http/tests/xmlhttprequest/onload-progressevent-attributes.html [ Failure ] http/tests/xmlhttprequest/xmlhttprequest-LSProgressEvent-ProgressEvent-should-match.html [ Failure ]
Attachments
Fujii Hironori
Comment 1 2024-04-10 00:34:17 PDT
This problem can be worked around by copying libcurl.dll from WebKitRequirementsWin64.zip v2024.03.29.
Kenji Shukuwa
Comment 2 2024-04-15 02:05:37 PDT
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; } ---
Radar WebKit Bug Importer
Comment 3 2024-04-17 00:11:17 PDT
Fujii Hironori
Comment 4 2024-04-18 05:10:13 PDT
(In reply to Fujii Hironori from comment #0) > However, the WinCairo buildbot doesn't fail. The reason why this problem isn't reproducible on the WinCairo buildbot is that it's failing to download the latest WebKitRequirements. https://build.webkit.org/#/builders/727/builds/22385 > Seeking release "v2024.04.17" from WebKitForWindows/WebKitRequirements... > <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
Kenji Shukuwa
Comment 5 2024-05-16 19:13:31 PDT
The cause of http/tests/inspector/network/resource-sizes-network.html was different from Comment 2. The problem has been occurring since the following PR was merged. https://github.com/curl/curl/pull/12964 This is due to CURLINFO_REQUEST_SIZE returning 0. Before the PR above, We were able to get CURLINFO_REQUEST_SIZE during the request header callback, but after the PR above, it returns 0, which causes the tests to fail. https://github.com/WebKit/WebKit/blob/8d7eceb1f07dd13e4e2195f14d02fc27489a87a9/Source/WebCore/platform/network/curl/CurlContext.cpp#L889-L891 --- CURLcode errorCode = curl_easy_getinfo(m_handle, CURLINFO_REQUEST_SIZE, &requestHeaderSize); if (errorCode != CURLE_OK) return; ---
Kenji Shukuwa
Comment 6 2024-05-16 20:53:14 PDT
EWS
Comment 7 2024-05-30 17:59:16 PDT
Committed 279553@main (8a9f0f239bc4): <https://commits.webkit.org/279553@main> Reviewed commits have been landed. Closing PR #28693 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.