code/dispatcher/request/abstract.php
public function isDownload()
    {
        $result = $this->query->has('force-download');

        if($this->headers->has('Accept'))
        {
            $accept = $this->headers->get('Accept');
            $types  = $this->__parseAccept($accept);

            //Get the highest quality format
            $type = key($types);

            if(in_array($type, array('application/force-download', 'application/octet-stream'))) {
                return $result = true;
            }
        }

        return $result;
    }
public function isDownload()
    {
        $result = $this->query->has('force-download');

        if($this->headers->has('Accept'))
        {
            $accept = $this->headers->get('Accept');
            $types  = $this->__parseAccept($accept);

            //Get the highest quality format
            $type = key($types);

            if(in_array($type, array('application/force-download', 'application/octet-stream'))) {
                return $result = true;
            }
        }

        return $result;
    }
public function isDownload ( ) { $ result = $ this -> query -> has ( 'force-download' ) ; if ( $ this -> headers -> has ( 'Accept' ) ) { $ accept = $ this -> headers -> get ( 'Accept' ) ; $ types = $ this -> __parseAccept ( $ accept ) ; //Get the highest quality format $ type = key ( $ types ) ; if ( in_array ( $ type , array ( 'application/force-download' , 'application/octet-stream' ) ) ) { return $ result = true ; } } return $ result ; }
Check if the request is downloadable or not.

A request is downloading if one of the following conditions are met :

1. The request query contains a 'force-download' parameter
2. The request accepts specifies either the application/force-download or application/octet-stream mime types

@return bool Returns TRUE If the request is downloadable. FALSE otherwise.
Check if the request is downloadable or not .