5require_once(
'./Services/Utilities/classes/class.ilMimeTypeUtil.php');
 
    6require_once(
'./Services/Utilities/classes/class.ilUtil.php'); 
 
    7require_once(
'./Services/Context/classes/class.ilContext.php');
 
    8require_once(
'./Services/Http/classes/class.ilHTTPS.php');
 
    9require_once(
'./Services/FileDelivery/classes/FileDeliveryTypes/FileDeliveryTypeFactory.php');
 
   10require_once 
'./Services/FileDelivery/classes/FileDeliveryTypes/DeliveryMethod.php';
 
  113        $this->httpService = $httpState;
 
  129        if (!$this->
delivery()->supportsStreaming()) {
 
  138        return $this->fileDeliveryTypeFactory->getInstance($this->
getDeliveryType());
 
  145        if (!$this->
delivery()->doesFileExists($this->path_to_file)) {
 
  146            $response = $this->httpService->response()->withStatus(404);
 
  147            $this->httpService->saveResponse(
$response);
 
  148            $this->httpService->sendResponse();
 
  151        $this->httpService->saveResponse(
$response);
 
  172            $this->httpService->saveResponse(
$response);
 
  182        $this->httpService->saveResponse(
$response);
 
  187            $this->httpService->saveResponse(
$response);
 
  190        $this->httpService->saveResponse(
$response);
 
  198        $this->httpService->saveResponse(
$response);
 
  227        $finfo = finfo_open(FILEINFO_MIME_TYPE);
 
  257        if (self::$delivery_type_static) {
 
  258            \ilWACLog::getInstance()->write(
'used cached delivery type');
 
  264        if (function_exists(
'apache_get_modules')
 
  265            && in_array(
'mod_xsendfile', apache_get_modules())
 
  270        if (is_file(
'./Services/FileDelivery/classes/override.php')) {
 
  271            $override_delivery_type = 
false;
 
  272            require_once(
'./Services/FileDelivery/classes/override.php');
 
  273            if ($override_delivery_type) {
 
  278        require_once(
'./Services/Environment/classes/class.ilRuntime.php');
 
  280        if ((!$ilRuntime->isFPM() && !$ilRuntime->isHHVM())
 
  535            $response = $this->httpService->response()->withHeader(
'ETag', $this->
getEtag());
 
  536            $this->httpService->saveResponse(
$response);
 
  544            $response = $this->httpService->response()->withHeader(
 
  549            $this->httpService->saveResponse(
$response);
 
  616        $ob_get_contents = ob_get_contents();
 
  617        if ($ob_get_contents) {
 
  687        foreach ($umlauts as $src => $tgt) {
 
  688            $original_filename = str_replace($src, $tgt, $original_filename);
 
  691        $ascii_filename = htmlentities($original_filename, ENT_NOQUOTES, 
'UTF-8');
 
  726        $response = $this->httpService->response();
 
  735        $this->httpService->saveResponse(
$response);
 
An exception for terminatinating execution or to throw for unit testing.
Provides an interface to the ILIAS HTTP services.
setExitAfter($exit_after)
setDeliveryType($delivery_type)
setShowLastModified($show_last_modified)
setDeleteFile($delete_file)
setConvertFileNameToAsci($convert_file_name_to_asci)
cleanDownloadFileName()
Converts the filename to ASCII.
$convert_file_name_to_asci
setSendMimeType($send_mime_type)
static $delivery_type_static
static returnASCIIFileName($original_filename)
Converts a UTF-8 filename to ASCII.
__construct($path_to_file, GlobalHttpState $httpState)
setDownloadFileName($download_file_name)
isConvertFileNameToAsci()
setPathToFile($path_to_file)
determineDownloadFileName()
setDisposition($disposition)
setHasContext($has_context)
setHashFilename($hash_filename)
Class FileDeliveryTypeFactory.
static getType()
Get context type.
const APPLICATION__OCTET_STREAM
static lookupMimeType($path_to_file, $fallback=self::APPLICATION__OCTET_STREAM, $a_external=null)
Interface GlobalHttpState.