Bug #79033 [NEW]: Curl timeout error with specific url and post

From: Date: Thu, 26 Dec 2019 01:07:15 +0000
Subject: Bug #79033 [NEW]: Curl timeout error with specific url and post
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224533@lists.php.net to get a copy of this message
From: dav dot tur19 at gmail dot com Operating system: linux/windows PHP version: 7.4.1 Package: cURL related Bug Type: Bug Bug description:Curl timeout error with specific url and post Description: ------------ If an empty array is set to CURLOPT_POSTFIELDS, the request will timeout, this does not happen on php7.3 or with CURLOPT_POSTFIELDS with other values. The problem occurs on both windows and linux. Test script: --------------- <?php $token = '12341234:WASDWASD'; $method = 'getMe'; $args = []; $curlRequestSession = curl_init(); curl_setopt_array($curlRequestSession, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_TIMEOUT => 3, CURLOPT_URL => 'https://api.telegram.org/bot' . $token . '/' . $method, CURLOPT_POSTFIELDS => $args, ]); $response = curl_exec($curlRequestSession); if($response === false) { echo curl_error($curlRequestSession) . PHP_EOL . var_export(curl_getinfo($curlRequestSession), true) . PHP_EOL; } else { echo 'Success: ' . $response . PHP_EOL; } -- Edit bug report at https://bugs.php.net/bug.php?id=79033&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79033&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79033&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79033&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79033&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79033&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79033&r=support Expected behavior: https://bugs.php.net/fix.php?id=79033&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79033&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79033&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79033&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79033&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79033&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79033&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79033&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79033&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79033&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79033&r=mysqlcfg

« previous php.bugs (#224533) next »