1
0
Fork 0

tools/web: fill a default Content-Type in case of POST

This commit is contained in:
nemunaire 2017-07-04 07:27:44 +02:00
parent b4218478bd
commit 0be6ebcd4b
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ def getURLContent(url, body=None, timeout=7, header=None):
elif "User-agent" not in header:
header["User-agent"] = "Nemubot v%s" % __version__
if body is not None and "Content-Type" not in header:
header["Content-Type"] = "application/x-www-form-urlencoded"
import socket
try:
if o.query != '':