'This method is called to create the default ``OPTIONS`` response.
This can be changed through subclassing to change the default
behavior of ``OPTIONS`` responses.
.. versionadded:: 0.7'

def make_default_options_response(self):

    adapter = _request_ctx_stack.top.url_adapter
    if hasattr(adapter, 'allowed_methods'):
        methods = adapter.allowed_methods()
    else:
        methods = []
        try:
            adapter.match(method='--')
        except MethodNotAllowed as e:
            methods = e.valid_methods
        except HTTPException as e:
            pass
    rv = self.response_class()
    rv.allow.update(methods)
    return rv
