aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-02-17 21:24:40 -0500
committerRapptz <[email protected]>2016-02-17 21:24:40 -0500
commit3ec99a7cb86f032112a2957de62a2343343de176 (patch)
tree520f201556201d94cc8d39cbe80f9e260a0588da
parentDo not overwrite members that are already in cache during chunking. (diff)
downloaddiscord.py-3ec99a7cb86f032112a2957de62a2343343de176.tar.xz
discord.py-3ec99a7cb86f032112a2957de62a2343343de176.zip
Fix NameError issue in Client.send_file.
-rw-r--r--discord/client.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py
index 6fe3b7b4..5e752899 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1064,10 +1064,8 @@ class Client:
files = aiohttp.FormData()
# we don't want the content-type json in this request
- headers = {
- 'authorization': self.token,
- 'user-agent': user_agent.format(library_version, sys.version_info, aiohttp.__version__)
- }
+ headers = self.headers.copy()
+ headers.pop('content-type', None)
try:
# attempt to open the file and send the request