def process_download_response(self, request, response):
        try:
            redirect_url = self.get_redirect_url(response)
        except NoRedirectionMatch:
            return response
        return XSendfileResponse(file_path=redirect_url,
                                 content_type=response['Content-Type'],
                                 basename=response.basename,
                                 attachment=response.attachment)
Replace DownloadResponse instances by XSendfileResponse ones.
dataset/ETHPy150Open benoitbryon/django-downloadview/django_downloadview/apache/middlewares.py/XSendfileMiddleware.process_download_response