Author: kgiusti
Date: Mon Jun 9 21:55:29 2014
New Revision: 1601513
URL: http://svn.apache.org/r1601513
Log:
QPID-5808: framer should consume only header bytes
Modified:
qpid/trunk/qpid/python/qpid/framer.py
Modified: qpid/trunk/qpid/python/qpid/framer.py
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/framer.py?rev=1601513&r1=1601512&r2=1601513&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/framer.py (original)
+++ qpid/trunk/qpid/python/qpid/framer.py Mon Jun 9 21:55:29 2014
@@ -90,7 +90,9 @@ class Framer(Packer):
def read(self, n):
while len(self.rx_buf) < n:
try:
- s = self.sock.recv(n) # NOTE: instead of "n", arg should be
"self.maxbufsize"
+ # QPID-5808: never consume more than n bytes from the socket,
+ # otherwise the extra bytes are discarded.
+ s = self.sock.recv(n - len(self.rx_buf))
if self.security_layer_rx:
try:
s = self.security_layer_rx.decode(s)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]