From 01fd58b2ff6b03dc5272e3f00aeeaa8c70eb0533 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 28 Aug 2022 15:37:52 +0100 Subject: [PATCH] if not showing paths, downgrade to version 1 --- .../com/muwire/core/connection/ConnectionAcceptor.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy b/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy index e4e88158..63cc7fea 100644 --- a/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy @@ -446,6 +446,9 @@ class ConnectionAcceptor { boolean showPaths = settings.showPaths && headers.containsKey('Path') && Boolean.parseBoolean(headers['Path']) + + if (!showPaths) + version = 1 boolean chat = chatServer.isRunning() && settings.advertiseChat os.write("Chat: ${chat}\r\n".getBytes(StandardCharsets.US_ASCII))