From 49a25112b4c8b8cef1f6d540d1403cee62b74f4b Mon Sep 17 00:00:00 2001 From: Andrii Nikitin Date: Fri, 28 Nov 2025 11:26:37 +0100 Subject: [PATCH] Add environment variable OSC_HTTP_MANUAL_REVIEW --- osc/connection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osc/connection.py b/osc/connection.py index 5bd0214e9..881705989 100644 --- a/osc/connection.py +++ b/osc/connection.py @@ -342,6 +342,14 @@ def http_request(method: str, url: str, headers=None, data=None, file=None): http.client.print(40 * '-') http.client.print(method, url) + if method != "GET" and os.environ['OSC_HTTP_MANUAL_APPROVE']: + print("osc is going to send "+ method +" request to " + urlopen_url) + if data: + print(data.decode("utf-8")) + y = input("press 'y' to continue or any other key to cancel") + if y != 'y' and y != 'Y': + raise Exception("Manual abort") + try: response = pool.urlopen( method, urlopen_url, body=data, headers=headers,