diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 7737878bd6c6e0a5859bfb3e43167487fa028217..e20b7d98f0d6833f8a84c46bae7e1ba919fed8dd 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -442,7 +442,9 @@ class HTTPClient {
                 $r_body = $this->_readData($socket, $length, 'response (content-length limited)', true);
             }elseif( !isset($this->resp_headers['transfer-encoding']) && $this->max_bodysize && !$this->keep_alive){
                 $r_body = $this->_readData($socket, $this->max_bodysize, 'response (content-length limited)', true);
-            }else{
+            } elseif ((int)$this->status === 204) {
+                // request has no content
+            } else{
                 // read entire socket
                 while (!feof($socket)) {
                     $r_body .= $this->_readData($socket, 4096, 'response (unlimited)', true);