Do not try to log partial binary data content, see #2053
This commit is contained in:
parent
23cbacfa5e
commit
4364dc8ede
1 changed files with 2 additions and 2 deletions
|
|
@ -314,7 +314,7 @@ class AMPMultiConnectionProtocol(amp.AMP):
|
||||||
try:
|
try:
|
||||||
super(AMPMultiConnectionProtocol, self).dataReceived(data)
|
super(AMPMultiConnectionProtocol, self).dataReceived(data)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
_get_logger().log_trace("Discarded incoming partial data: {}".format(to_str(data)))
|
_get_logger().log_trace("Discarded incoming partial (packed) data (len {})".format(len(data)))
|
||||||
elif self.multibatches:
|
elif self.multibatches:
|
||||||
# invalid AMP, but we have a pending multi-batch that is not yet complete
|
# invalid AMP, but we have a pending multi-batch that is not yet complete
|
||||||
if data[-2:] == NULNUL:
|
if data[-2:] == NULNUL:
|
||||||
|
|
@ -323,7 +323,7 @@ class AMPMultiConnectionProtocol(amp.AMP):
|
||||||
try:
|
try:
|
||||||
super(AMPMultiConnectionProtocol, self).dataReceived(data)
|
super(AMPMultiConnectionProtocol, self).dataReceived(data)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
_get_logger().log_trace("Discarded incoming multi-batch data:".format(to_str(data)))
|
_get_logger().log_trace("Discarded incoming multi-batch (packed) data (len {})".format(len(data)))
|
||||||
else:
|
else:
|
||||||
# not an AMP communication, return warning
|
# not an AMP communication, return warning
|
||||||
self.transport.write(_HTTP_WARNING)
|
self.transport.write(_HTTP_WARNING)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue