diff options
-rw-r--r-- | includes/common.inc | 2 | ||||
-rw-r--r-- | includes/file.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index b8cdc11a3..47fb29bd9 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -333,7 +333,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = fwrite($fp, $request); // Fetch response. - while (!feof($fp) && $data = fgets($fp)) { + while (!feof($fp) && $data = fgets($fp, 1024)) { $response[] = $data; } fclose($fp); diff --git a/includes/file.inc b/includes/file.inc index 27fcd181c..d3f6344a3 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -307,7 +307,7 @@ function file_transfer($source, $headers) { // Transfer file in 1024 byte chunks to save memory usage. $fd = fopen($source, 'rb'); while (!feof($fd)) { - print fgets($fd); + print fgets($fd, 1024); } fclose($fd); exit(); |