1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Fix so POSTs bodys of UDSActor are never empty

This commit is contained in:
Adolfo Gómez García 2017-06-27 10:40:15 +02:00
parent 876e9ee3b5
commit 65d4e8f316

View File

@ -148,6 +148,8 @@ class Api(object):
logger.debug('Requesting with old')
r = requests.get(url) # Always ignore certs??
else:
if data == '':
data = '{"dummy": true}' # Ensures no proxy rewrites POST as GET because body is empty...
if self.newerRequestLib:
r = requests.post(url, data=data, headers={'content-type': 'application/json'}, verify=VERIFY_CERT)
else: