From 03637b31855f99046591bd0def572e8e03383e7a Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 20 Sep 2023 22:35:26 +0200 Subject: [PATCH] Buffer: Buffer messages with incomplete quotes If a non-JSON message received contains quotes and is cut off weirdly, the following message might "quote" the line breaks. Then, we have an issue and cause \r\n\n for the further processing within the CodeOcean backend. --- lib/runner/connection/buffer.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/runner/connection/buffer.rb b/lib/runner/connection/buffer.rb index 95e4cc38..e8f18e82 100644 --- a/lib/runner/connection/buffer.rb +++ b/lib/runner/connection/buffer.rb @@ -88,6 +88,8 @@ class Runner::Connection::Buffer return true if invalid_json && message.start_with?(/\s*{"cmd/) # Third, buffer the message if it contains long messages (e.g., an image or turtle batch commands) return true if invalid_json && (message.start_with?('