@@ -287,6 +287,7 @@ cdef class Protocol(BaseProtocol):
287
287
DataTypesMessage data_types_message
288
288
FastAuthMessage fast_auth_message
289
289
ProtocolMessage protocol_message
290
+ bint supports_end_of_response
290
291
AuthMessage auth_message
291
292
292
293
# if we can use OOB, send an urgent message now followed by a reset
@@ -311,10 +312,15 @@ cdef class Protocol(BaseProtocol):
311
312
fast_auth_message.auth_message = auth_message
312
313
self ._process_message(fast_auth_message)
313
314
314
- # otherwise, do the normal authentication
315
+ # otherwise, do the normal authentication; disable end of response for
316
+ # the first two messages as the server does not send an end of response
317
+ # for these messages
315
318
else :
319
+ supports_end_of_response = self ._caps.supports_end_of_response
320
+ self ._caps.supports_end_of_response = False
316
321
self ._process_message(protocol_message)
317
322
self ._process_message(data_types_message)
323
+ self ._caps.supports_end_of_response = supports_end_of_response
318
324
self ._process_message(auth_message)
319
325
320
326
# send authorization message a second time, if needed, to respond to
@@ -637,6 +643,7 @@ cdef class BaseAsyncProtocol(BaseProtocol):
637
643
DataTypesMessage data_types_message
638
644
FastAuthMessage fast_auth_message
639
645
ProtocolMessage protocol_message
646
+ bint supports_end_of_response
640
647
AuthMessage auth_message
641
648
642
649
# create the messages that need to be sent to the server
@@ -654,10 +661,15 @@ cdef class BaseAsyncProtocol(BaseProtocol):
654
661
fast_auth_message.auth_message = auth_message
655
662
await self ._process_message(fast_auth_message)
656
663
657
- # otherwise, do the normal authentication
664
+ # otherwise, do the normal authentication; disable end of response for
665
+ # the first two messages as the server does not send an end of response
666
+ # for these messages
658
667
else :
668
+ supports_end_of_response = self ._caps.supports_end_of_response
669
+ self ._caps.supports_end_of_response = False
659
670
await self ._process_message(protocol_message)
660
671
await self ._process_message(data_types_message)
672
+ self ._caps.supports_end_of_response = supports_end_of_response
661
673
await self ._process_message(auth_message)
662
674
663
675
# send authorization message a second time, if needed, to respond to
0 commit comments