[Web] Change request.base path encoding to utf-8
A user reported a problem with setting base path resulting in this error: encoding with 'idna' codec failed (UnicodeError: label too long) It is likely the base path is longer than 63 chars, which is unusual, however the idna codec is for domain name not paths so switch to utf-8. Fixes: #3261
This commit is contained in:
parent
4dd1f63b8b
commit
5d7db3e727
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
- Fix TypeError in Peers Tab setting country flag.
|
- Fix TypeError in Peers Tab setting country flag.
|
||||||
- Fix reverse proxy header TypeError (#3260).
|
- Fix reverse proxy header TypeError (#3260).
|
||||||
|
- Fix request.base 'idna' codec error (#3261).
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|
|
@ -583,7 +583,7 @@ class TopLevel(resource.Resource):
|
||||||
if base[-1] != '/':
|
if base[-1] != '/':
|
||||||
base += '/'
|
base += '/'
|
||||||
|
|
||||||
request.base = base.encode('idna')
|
request.base = base.encode('utf-8')
|
||||||
|
|
||||||
return resource.Resource.getChildWithDefault(self, path, request)
|
return resource.Resource.getChildWithDefault(self, path, request)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue