From 74972875ffb09de46e6dbd50a8677ffff48f31d0 Mon Sep 17 00:00:00 2001 From: breakwa11 Date: Mon, 28 Sep 2015 17:48:27 +0800 Subject: [PATCH] tiny fix --- shadowsocks/obfsplugin/http_simple.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shadowsocks/obfsplugin/http_simple.py b/shadowsocks/obfsplugin/http_simple.py index 367d7cc..6df2f2e 100644 --- a/shadowsocks/obfsplugin/http_simple.py +++ b/shadowsocks/obfsplugin/http_simple.py @@ -217,6 +217,7 @@ class tls_simple(object): self.has_recv_header = True if not match_begin(buf, b'\x16\x03\x01'): + self.has_sent_header = True return (buf, True, False) # (buffer_to_recv, is_need_decrypt, is_need_to_encode_and_send_back) return (b'', False, True) @@ -244,9 +245,10 @@ class random_head(object): if self.has_recv_header: return (buf, True, False) + self.has_recv_header = True crc = binascii.crc32(buf) & 0xffffffff if crc != 0xffffffff: + self.has_sent_header = True return (buf, True, False) - self.has_recv_header = True # (buffer_to_recv, is_need_decrypt, is_need_to_encode_and_send_back) return (b'', False, True)