From 0503fbb63a7d27fbaaa04a228203a82d6732dea4 Mon Sep 17 00:00:00 2001 From: fosple <4522947+fosple@users.noreply.github.com> Date: Sat, 18 May 2024 12:06:48 +0200 Subject: [PATCH] Update change_upstream_proxy.py (#6853) Script was not working as ServerSpec accepts a tuple, which was not supplied. I fixed it so a tuple is supplied to ServerSpec --- examples/contrib/change_upstream_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/contrib/change_upstream_proxy.py b/examples/contrib/change_upstream_proxy.py index 0a0d54067..682f02e86 100644 --- a/examples/contrib/change_upstream_proxy.py +++ b/examples/contrib/change_upstream_proxy.py @@ -31,4 +31,4 @@ def request(flow: http.HTTPFlow) -> None: # server_conn already refers to an existing connection (which cannot be modified), # so we need to replace it with a new server connection object. flow.server_conn = Server(address=flow.server_conn.address) - flow.server_conn.via = ServerSpec("http", address) + flow.server_conn.via = ServerSpec(("http", address))