mirror of https://github.com/D4-project/d4-core
fix: [server] fix buffer with incomplete header
parent
fef4513ecc
commit
e19e301038
|
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue