From 65d4e8f316bffe024d366f8dae12e77110d471ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 27 Jun 2017 10:40:15 +0200 Subject: [PATCH] Fix so POSTs bodys of UDSActor are never empty --- actors/src/udsactor/REST.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/actors/src/udsactor/REST.py b/actors/src/udsactor/REST.py index d7e82d825..1ad106ed1 100644 --- a/actors/src/udsactor/REST.py +++ b/actors/src/udsactor/REST.py @@ -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: