dont strip newlines when forwarding FUNCTION_PAYLOAD (#16120)
dont strip newlines when forwarding function payload
Timotej S committed
Oct 4, 2023 at 11:46 UTC
3b05ef24a941f6476b58141c28f29df6a0900baf
1 file changed
+2
streaming/sender.c
+2
@@ -956,6 +956,8 @@ void execute_commands(struct sender_state *s) {
956
*newline = '\0';
957
958
if (s->receiving_function_payload && unlikely(strcmp(start, PLUGINSD_KEYWORD_FUNCTION_PAYLOAD_END) != 0)) {
959
+ if (buffer_strlen(s->function_payload.payload) != 0)
960
+ buffer_strcat(s->function_payload.payload, "\n");
961
buffer_strcat(s->function_payload.payload, start);
962
start = newline + 1;
963
continue;