Skip to content

No Content-Type header for "downloadable page type" #2

@michael-e

Description

@michael-e

Resolving the page type does not work if the page type is "downloadable", e.g. starts with a dot. Since resolving returns NULL, no Content-Type will be set at all (which means problems especially in Safari).

Fortunately the solution is simple. The function in the extension driver is:

public function resolveType($type){
    return $this->_Parent->Configuration->get(strtolower($type), 'content-type-mappings');
}

Here's one possible solution:

public function resolveType($type){
    if($type{0} == '.'){  
        return $this->_Parent->Configuration->get(strtolower(substr($type, 1)), 'content-type-mappings');                               
    } else {
        return $this->_Parent->Configuration->get(strtolower($type), 'content-type-mappings');              
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions