Bug #79289 [Dup]: POSTing a CurlFile causes timeout

From: Date: Thu, 20 Feb 2020 12:59:37 +0000
Subject: Bug #79289 [Dup]: POSTing a CurlFile causes timeout
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225653@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79289&edit=1 ID: 79289 User updated by: anton dot gardalv at winlas dot se Reported by: anton dot gardalv at winlas dot se Summary: POSTing a CurlFile causes timeout Status: Duplicate Type: Bug Package: cURL related Operating System: Windows PHP Version: 7.4.2 Assigned To: cmb Block user comment: N Private report: N New Comment: Okay, Thanks a lot for your answer :) Previous Comments: ------------------------------------------------------------------------ [2020-02-20 12:53:08] cmb@php.net Thanks! Then this is indeed a duplicate of the mentioned bug, which will be fixed in PHP 7.4.4 one way or another. ------------------------------------------------------------------------ [2020-02-20 12:47:52] anton dot gardalv at winlas dot se Yes, receiving sapi is running fastcgi in iis ------------------------------------------------------------------------ [2020-02-20 12:41:43] cmb@php.net This is likely a duplicate of bug #79013. Which SAPI is receiving the upload? IIS/FCGI? ------------------------------------------------------------------------ [2020-02-20 10:11:11] anton dot gardalv at winlas dot se Description: ------------ Hello, after upgrading some of our environments to PHP 7.4 we've noticed that POSTing a CurlFile via CURLOPT_POSTFIELDS seems to cause a timeout. The test script works fine in PHP 7.3 but times out in 7.4. Test script: --------------- <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "http://localhost/testpost.php", CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_TIMEOUT => 25, CURLOPT_FOLLOWLOCATION => false, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array('file'=> new CURLFILE('C:/test.txt')), )); $response = curl_exec($curl); var_dump($response); curl_close($curl); ?> TestPost.php <?php var_dump($_POST); var_dump($_FILES); ?> Expected result: ---------------- A reply from the TestPost.php script containing information about the file I sent earlier. Actual result: -------------- PHP/Curl times out. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79289&edit=1

« previous php.bugs (#225653) next »