WSGI middleware for batch requests