diff options
| author | Rapptz <[email protected]> | 2017-06-17 01:04:16 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-06-17 01:04:38 -0400 |
| commit | 851d4ce22aa1417033565352b84b18950df15400 (patch) | |
| tree | 965732d7e2a972bec529d4dfa847faa61cd7249e /discord/http.py | |
| parent | Make checking for truth-ness of EmbedProxy easier. (diff) | |
| download | discord.py-851d4ce22aa1417033565352b84b18950df15400.tar.xz discord.py-851d4ce22aa1417033565352b84b18950df15400.zip | |
Properly quote reason header so non-ASCII works in audit log reasons.
Diffstat (limited to 'discord/http.py')
| -rw-r--r-- | discord/http.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/http.py b/discord/http.py index 41133562..41bc2565 100644 --- a/discord/http.py +++ b/discord/http.py @@ -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 |