You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing an issue with some servers having kesl service (Kaspersky) installed and running.
Sometimes wp_remote_* calls fails with error:
Scaricamento del pacchetto di installazione da https://downloads.wordpress.org/plugin/jetpack.10.1.zip...
Warning: Il download non è andato a buon fine. "cURL error 18: transfer closed with 332690 bytes remaining to read"
The number of bytes is completely randomic.
Since it's not consistent, I've prepared this script to be run over and over (without wp-cli cache of course):
while :; do wp plugin install jetpack && wp plugin delete jetpack && rm -rf /root/.wp-cli/cache/*; done
After digging a lot into WpOrg\Requests\Transport\cURL implementation I've found these lines being the cause of the issue:
<?php// Force closing the connection for old versions of cURL (<7.22).if (!isset($headers['Connection'])) {
$headers['Connection'] = 'close';
}
Disabling these lines, the issue disappear. Why aren't we checking the cURL version here?
I would then suggest these changes:
Add a new const const CURL_7_22_0 = 0x071600
Check the version and add that header only if needed
Your environment
Environment
Answer
Operating system and version (e.g. Ubuntu 20.04, CentOS, tried both)
PHP version
7.4 (tried others as well)
Requests version
provided with WordPress latest
Autoloader used
WordPress
Link to your project
into a vpn, not accessible through the internet
Tested against develop branch?
I have verified the issue still exists in the develop branch of Requests.
The text was updated successfully, but these errors were encountered:
FYI: A patch for this issue was included in the Requests 2.0.8 release and reverted in Requests 2.0.9 due to it causing problems with Curl 7.29.0 (and possibly others). See #838
Re-opening this issue as it is now unsolved again. This will need further investigation in conjunction with #838.
Summary
I'm facing an issue with some servers having kesl service (Kaspersky) installed and running.
Sometimes wp_remote_* calls fails with error:
The number of bytes is completely randomic.
Since it's not consistent, I've prepared this script to be run over and over (without wp-cli cache of course):
After digging a lot into WpOrg\Requests\Transport\cURL implementation I've found these lines being the cause of the issue:
Disabling these lines, the issue disappear. Why aren't we checking the cURL version here?
I would then suggest these changes:
Your environment
Tested against
develop
branch?develop
branch of Requests.The text was updated successfully, but these errors were encountered: