fix: [server] fix buffer with incomplete header

pull/23/head
Terrtia 2019-01-03 12:01:06 +01:00
parent fef4513ecc
commit e19e301038
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 4 additions and 3 deletions

View File

@ -109,9 +109,9 @@ class Echo(Protocol):
else: else:
# add previous data # add previous data
if len(data) < 62: if len(data) < 62:
data = self.buffer + data self.buffer += data
print(data) print(self.buffer)
print() print(len(self.buffer))
#todo check if valid header before adding ? #todo check if valid header before adding ?
else: else:
data = self.buffer + data data = self.buffer + data
@ -144,6 +144,7 @@ class Echo(Protocol):
print('hmac match') print('hmac match')
else: else:
print('hmac do not match') print('hmac do not match')
print(data)
print() print()