From ae8b10f8363f7a1df02e77cbd820904c4ded10b8 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 27 Apr 2022 18:17:01 +0200 Subject: [PATCH] as a comment in plc.wsgi: keep track of potentially useful debug snippet --- apache/plc.wsgi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apache/plc.wsgi b/apache/plc.wsgi index 40a1327..b16b7f2 100644 --- a/apache/plc.wsgi +++ b/apache/plc.wsgi @@ -23,6 +23,7 @@ def application(environ, start_response):

PLCAPI WSGI XML-RPC/SOAP Interface

Please use XML-RPC or SOAP to access the PLCAPI.

+

At the very least you need to use a POST method.

""" else: @@ -37,6 +38,14 @@ def application(environ, start_response): ip = environ.get('REMOTE_ADDR') port = environ.get('REMOTE_PORT') output = api.handle((ip,port), environ.get('wsgi.input').read()) +# uncomment for debug +# try: +# with open("/tmp/dbgplc.log", "a") as f: +# print(f"{ip=} {port=}\n" +# f"{output=}", +# file=f) +# except Exception as exc: +# pass # Shut down database connection, otherwise up to MaxClients DB # connections will remain open. api.db.close() -- 2.43.0