. */ /** * This file contains the HTTPBigResponse class. * * @author Dinu Florin * @package Modules * @subpackage Network */ /** * HTTPBigResponse class, this class keeps it's data in a temp file. * * @author Dinu Florin * @package Modules * @subpackage Network */ class HTTPBigResponse extends HTTPResponse { protected $fileName = null; /** * Get the temporary file name. * * @return string */ public function getTempFile() { return $this->fileName; } /** * Get the content of the output buffer. * * @return string * @see HTTPResponse::getContent() */ public function getContent() { return null; } /** * Constructor. * * @param string $fileName The temporary file name. */ public function __construct($fileName) { $this->fileName = $fileName; $file = fopen($fileName, 'r'); //Read the headers from the file. $headers = ''; while(!feof($file)) { $buff = fgets($file, 10240); $headers .= $buff; if($buff == "\r\n") { break; } } fclose($file); parent::__construct($headers); } } ?>