|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-18 19:13 UTC] jani@php.net
[2009-12-19 10:47 UTC] geozipp at excite dot com
[2009-12-26 01:00 UTC] php-bugs at lists dot php dot net
[2010-06-22 00:49 UTC] felipe@php.net
-Status: No Feedback
+Status: Open
-Operating System: Windows
+Operating System: *
-PHP Version: 5.3.1
+PHP Version: 5.*, trunk
[2010-06-22 00:49 UTC] felipe@php.net
[2010-06-26 20:46 UTC] felipe@php.net
-Package: cURL related
+Package: Documentation problem
[2010-10-20 02:39 UTC] kalle@php.net
[2010-10-20 02:39 UTC] kalle@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: kalle
[2010-10-20 02:39 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 23:00:01 2025 UTC |
Description: ------------ When the curl handle is reused, curl_getinfo() contains the previous download_content_length value if the current url header contains no Content-Length: header. Reproduce code: --------------- $url_list = array('http://example.com', 'http://php.net'); $ch = curl_init(); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_HEADER, true); foreach ($url_list as $each) { curl_setopt($ch, CURLOPT_URL, $each); curl_exec($ch); echo curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD) . "\n"; } curl_close($ch); Expected result: ---------------- "-1" as the last value, since the response from the second url (http://php.net) contains no Content-Length: line. Actual result: -------------- HTTP/1.1 200 OK ...(header lines) Content-Length: 438 438 HTTP/1.1 200 OK ...(header lines 438