From 6db548fde10fffd5bca98f5485947de379142e45 Mon Sep 17 00:00:00 2001 From: xuyaoqiang Date: Tue, 1 Aug 2017 13:47:01 +0800 Subject: [PATCH] compatiable fix for namespace messed up --- socketio/packet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/socketio/packet.py b/socketio/packet.py index dd9f859..c047611 100644 --- a/socketio/packet.py +++ b/socketio/packet.py @@ -1,5 +1,6 @@ import functools import json as _json +from urllib.parse import urlparse import six @@ -87,7 +88,7 @@ class Packet(object): ep = '' self.namespace = None self.data = None - ep = ep[1:] + ep = urlparse(ep[1:]).path dash = (ep + '-').find('-') attachment_count = 0 if ep[0:dash].isdigit():