Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
michael-e opened this issue Nov 8, 2009 · 0 comments
Open

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

michael-e opened this issue Nov 8, 2009 · 0 comments

Comments

@michael-e
Copy link

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');              
    }
}
nitriques referenced this issue in Solutions-Nitriques/content_type_mappings Jul 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant