diff --git a/core/src/main/groovy/com/muwire/core/search/ResultsSender.groovy b/core/src/main/groovy/com/muwire/core/search/ResultsSender.groovy index 5c3d674d..f58c1198 100644 --- a/core/src/main/groovy/com/muwire/core/search/ResultsSender.groovy +++ b/core/src/main/groovy/com/muwire/core/search/ResultsSender.groovy @@ -71,6 +71,7 @@ class ResultsSender { DataOutputStream os = new DataOutputStream(endpoint.getOutputStream()) os.write("POST $uuid\r\n".getBytes(StandardCharsets.US_ASCII)) me.write(os) + os.writeShort((short)results.length) results.each { byte [] name = it.getFile().getName().getBytes(StandardCharsets.UTF_8) def baos = new ByteArrayOutputStream()