fix http_post under py3
This commit is contained in:
parent
b655222857
commit
7b62f9f530
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ class http_post(http_simple):
|
||||||
super(http_post, self).__init__(method)
|
super(http_post, self).__init__(method)
|
||||||
|
|
||||||
def boundary(self):
|
def boundary(self):
|
||||||
return b''.join([chr(random.choice(b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")) for i in range(32)])
|
return to_bytes(''.join([random.choice("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") for i in range(32)]))
|
||||||
|
|
||||||
def client_encode(self, buf):
|
def client_encode(self, buf):
|
||||||
if self.has_sent_header:
|
if self.has_sent_header:
|
||||||
|
|
Loading…
Add table
Reference in a new issue