|
|
@ -34,6 +34,13 @@ class Response {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protected $sent = false;
|
|
|
|
protected $sent = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* header Content-Length
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @var boolean
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public $content_length = true;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @var array HTTP status codes
|
|
|
|
* @var array HTTP status codes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -251,12 +258,14 @@ class Response {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($this->content_length) {
|
|
|
|
// Send content length
|
|
|
|
// Send content length
|
|
|
|
$length = $this->getContentLength();
|
|
|
|
$length = $this->getContentLength();
|
|
|
|
|
|
|
|
|
|
|
|
if ($length > 0) {
|
|
|
|
if ($length > 0) {
|
|
|
|
header('Content-Length: '.$length);
|
|
|
|
header('Content-Length: '.$length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|