'Determine the requested response content-type.'

def best_match_content_type(self):

    if ('nova.best_content_type' not in self.environ):
        content_type = None
        parts = self.path.rsplit('.', 1)
        if (len(parts) > 1):
            possible_type = ('application/' + parts[1])
            if (possible_type in get_supported_content_types()):
                content_type = possible_type
        if (not content_type):
            content_type = self.accept.best_match(get_supported_content_types())
        self.environ['nova.best_content_type'] = (content_type or 'application/json')
    return self.environ['nova.best_content_type']
