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