def serialize(self, request, content_type, default_serializers=None):

        if self.serializer:
            serializer = self.serializer
        else:
            _mtype, _serializer = self.get_serializer(content_type,
                                                      default_serializers)
            serializer = _serializer()

        response = webob.Response()
        response.status_int = self.code
        for hdr, value in self._headers.items():
            response.headers[hdr] = utils.utf8(str(value))
        response.headers['Content-Type'] = utils.utf8(content_type)
        if self.obj is not None:
            response.body = serializer.serialize(self.obj)

        return response
L{DigestCredentialFactory.decode} raises L{LoginFailed} when the
dataset/ETHPy150Open openstack/rack/rack/api/wsgi.py/ResponseObject.serialize--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_digestauth.py/DigestAuthTests.test_incompatibleClientIP