mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Properly quote reason header so non-ASCII works in audit log reasons.
This commit is contained in:
parent
15edfc2b26
commit
851d4ce22a
@ -32,6 +32,7 @@ import logging
|
||||
import weakref
|
||||
import datetime
|
||||
from email.utils import parsedate_to_datetime
|
||||
from urllib.parse import quote as _uriquote
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -130,7 +131,7 @@ class HTTPClient:
|
||||
pass
|
||||
else:
|
||||
if reason:
|
||||
headers['X-Audit-Log-Reason'] = reason
|
||||
headers['X-Audit-Log-Reason'] = _uriquote(reason, safe='/ ')
|
||||
|
||||
kwargs['headers'] = headers
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user