'Check Accept header for best matching MIME type and API version.'

def _accept_strategy(self, host, port, environ, supported_content_types):

    accept = Accept(environ.get('HTTP_ACCEPT', ''))
    app = None
    (mime_type, params) = accept.best_match(supported_content_types)
    if ('version' in params):
        (app, app_url) = self._match(host, port, ('/v' + params['version']))
        if app:
            app = self._set_script_name(app, app_url)
    return (mime_type, app)
