py23 urlib compat
unquote was move dto a diferent location
This commit is contained in:
1 parent
f72f948744
commit
6cfbdc6062
1 file changed
+4
-1
@@ -508,7 +508,10 @@ def _extended_header_value(value):
|
||||
|
||||
if value.lower().startswith("iso-8859-1'") or value.lower().startswith("utf-8'"):
|
||||
# RFC 5987 section 3.2
|
||||
from urllib import unquote
|
||||
try:
|
||||
from urllib import unquote
|
||||
except ImportError:
|
||||
from urllib.parse import unquote
|
||||
encoding, _, value = value.split("'", 2)
|
||||
return unquote(octoprint.util.to_str(value, encoding="iso-8859-1")).decode(encoding)
|
||||
|
||||
|
||||
Reference in new issue
Block a user