Commit 3100ef37 authored by Dries's avatar Dries

- Patch #6517 by kika: drupal_http_request() fails to open feed because on PHP...

- Patch #6517 by kika: drupal_http_request() fails to open feed because on PHP 4.1.2.  Also updated file.inc.
parent 45cd7344
...@@ -333,7 +333,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = ...@@ -333,7 +333,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
fwrite($fp, $request); fwrite($fp, $request);
// Fetch response. // Fetch response.
while (!feof($fp) && $data = fgets($fp)) { while (!feof($fp) && $data = fgets($fp, 1024)) {
$response[] = $data; $response[] = $data;
} }
fclose($fp); fclose($fp);
......
...@@ -307,7 +307,7 @@ function file_transfer($source, $headers) { ...@@ -307,7 +307,7 @@ function file_transfer($source, $headers) {
// Transfer file in 1024 byte chunks to save memory usage. // Transfer file in 1024 byte chunks to save memory usage.
$fd = fopen($source, 'rb'); $fd = fopen($source, 'rb');
while (!feof($fd)) { while (!feof($fd)) {
print fgets($fd); print fgets($fd, 1024);
} }
fclose($fd); fclose($fd);
exit(); exit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment