Ticket #6556 enhancement new
LineReceiver rejects lines of length MAX_LENGTH sometimes
|Reported by:||zooko||Owned by:||zooko|
(diff, github, buildbot, log)
If MAX_LENGTH is 3 and delimiter is '\r\n', and I send "xyz\r" and then "\n" in two packets, LineReceiver will disconnect after receiving the first packet, calling lineLengthExceeded. On the other hand if I send "xyz\r\n" in one packet, LineReceiver will accept the line.
Here is a test. I propose a fix: LineReceiver should not check for line-length-exceeded until the number of bytes of the data >= MAX_LENGTH + len(delimiter).