Skip to content

Commit 887d49a

Browse files
authored
Merge pull request #88 from lgt1001/master
should encode with utf-8 and return as TEXT if data is str on python2.7
2 parents c13b1e1 + 5726371 commit 887d49a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SimpleWebSocketServer/SimpleWebSocketServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _check_unicode(val):
3131
if VER >= 3:
3232
return isinstance(val, str)
3333
else:
34-
return isinstance(val, unicode)
34+
return isinstance(val, basestring)
3535

3636
class HTTPRequest(BaseHTTPRequestHandler):
3737
def __init__(self, request_text):

0 commit comments

Comments
 (0)