Skip to content

Commit d482fbf

Browse files
authored
Merge pull request Snawoot#91 from Snawoot/unicode_req
allow unicode requests
2 parents 89eb56b + d551877 commit d482fbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

postfix_mta_sts_resolver/responder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from .base_cache import CacheEntry
1414
from . import netstring
1515

16+
REQUEST_ENCODING = 'utf-8'
1617

1718
ZoneEntry = collections.namedtuple('ZoneEntry', ('strict', 'resolver', 'require_sni'))
1819

@@ -164,7 +165,7 @@ async def process_request(self, raw_req):
164165
have_policy = True
165166

166167
# Parse request and canonicalize domain
167-
req_zone, _, req_domain = raw_req.decode('ascii').partition(' ')
168+
req_zone, _, req_domain = raw_req.decode(REQUEST_ENCODING).partition(' ')
168169
domain = filter_domain(req_domain)
169170

170171
# Skip lookups for parent domain policies

0 commit comments

Comments
 (0)