When receiving a 0-byte FlowFile via site-to-site, avoid writing to the FlowFile at all
@@ -446,7 +446,11 @@ public abstract class AbstractFlowFileServerProtocol implements ServerProtocol {
break;
}
FlowFile flowFile = session.create();
+
+ if (dataPacket.getSize() > 0) {
flowFile = session.importFrom(dataPacket.getData(), flowFile);
+ }
+
flowFile = session.putAllAttributes(flowFile, dataPacket.getAttributes());
if (handshakeProperties.isUseGzip()) {
