mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 20:20:53 +00:00
Fix response length calculation when curl_exec() returns false on failure
This commit is contained in:
+2
-1
@@ -1461,7 +1461,8 @@ class Curl
|
||||
$request_body_empty = empty($this->getOpt(CURLOPT_POSTFIELDS));
|
||||
$response_header_length = isset($this->responseHeaders['Content-Length']) ?
|
||||
$this->responseHeaders['Content-Length'] : '(not specified in response header)';
|
||||
$response_calculated_length = strlen($this->rawResponse);
|
||||
$response_calculated_length = is_string($this->rawResponse) ?
|
||||
strlen($this->rawResponse) : '(' . var_export($this->rawResponse, true) . ')';
|
||||
$response_headers_count = count($this->responseHeaders);
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user