Skip to content

Commit

Permalink
and tidy up the exception message thrown so it is readable
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Dec 31, 2023
1 parent a510220 commit 4eb8fd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Zend/Http/Client/Adapter/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,12 @@ public function read()
} else {
$this->close();
require_once 'Zend/Http/Client/Adapter/Exception.php';
$encoding = $headers['transfer-encoding'];
if (is_array($encoding)) {
$encoding = json_encode($encoding);
}
throw new Zend_Http_Client_Adapter_Exception('Cannot handle "' .
$headers['transfer-encoding'] . '" transfer encoding');
$encoding . '" transfer encoding');
}

// We automatically decode chunked-messages when writing to a stream
Expand Down

0 comments on commit 4eb8fd1

Please sign in to comment.