*/
class StreamFile {
// Do not send any HTTP headers unless requested by caller (e.g. body only)
+ /** @deprecated since 1.34 */
const STREAM_HEADLESS = HTTPFileStreamer::STREAM_HEADLESS;
// Do not try to tear down any PHP output buffers
+ /** @deprecated since 1.34 */
const STREAM_ALLOW_OB = HTTPFileStreamer::STREAM_ALLOW_OB;
/**
protected function doStreamFile( array $params ) {
$status = $this->newStatus();
- $flags = !empty( $params['headless'] ) ? StreamFile::STREAM_HEADLESS : 0;
+ $flags = !empty( $params['headless'] ) ? HTTPFileStreamer::STREAM_HEADLESS : 0;
list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
if ( $srcRel === null ) {
- StreamFile::send404Message( $params['src'], $flags );
+ HTTPFileStreamer::send404Message( $params['src'], $flags );
$status->fatal( 'backend-fail-invalidpath', $params['src'] );
return $status;
$auth = $this->getAuthentication();
if ( !$auth || !is_array( $this->getContainerStat( $srcCont ) ) ) {
- StreamFile::send404Message( $params['src'], $flags );
+ HTTPFileStreamer::send404Message( $params['src'], $flags );
$status->fatal( 'backend-fail-stream', $params['src'] );
return $status;
// If "headers" is set, we only want to send them if the file is there.
// Do not bother checking if the file exists if headers are not set though.
if ( $params['headers'] && !$this->fileExists( $params ) ) {
- StreamFile::send404Message( $params['src'], $flags );
+ HTTPFileStreamer::send404Message( $params['src'], $flags );
$status->fatal( 'backend-fail-stream', $params['src'] );
return $status;