[ticket/10278] Also set timeout on stream in get_remote_file().

From the PHP manual for fsockopen():
If you need to set a timeout for reading/writing data over the socket, use
stream_set_timeout(), as the timeout parameter to fsockopen() only applies
while connecting the socket.
http://www.php.net/manual/en/function.fsockopen.php

PHPBB3-10278
This commit is contained in:
Andreas Fischer 2011-08-25 20:14:49 +02:00
parent 540ca1a8d8
commit 2ffdf56bfe

View file

@ -3140,6 +3140,8 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
@fputs($fsock, "HOST: $host\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
stream_set_timeout($fsock, $timeout);
$file_info = '';
$get_info = false;