

def process_request(self, request):
    '\n        Return a 405 "Not Allowed" if the request\'s client major version\n        doesn\'t match this controller\'s REST API major version (currently "1").\n        '
    try:
        client_version = request.META['HTTP_DEIS_VERSION']
        server_version = __version__.rsplit('.', 2)[0]
        if (client_version != server_version):
            message = {
                'error': (('Client and server versions do not match. ' + 'Client version: {} '.format(client_version)) + 'Server version: {}'.format(server_version)),
            }
            return HttpResponse(json.dumps(message), content_type='application/json', status=status.HTTP_405_METHOD_NOT_ALLOWED)
    except KeyError:
        pass

dataset/ETHPy150Open deis/deis/controller/api/middleware.py APIVersionMiddleware.process_request/original