From 380ec45bba7fbf1e802e952cfaa77db78b599b26 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Wed, 29 May 2019 11:25:35 +0100 Subject: [PATCH] small fixes --- .../main/groovy/com/muwire/core/upload/UploadManager.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy b/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy index 24e28a8a..f4523135 100644 --- a/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy +++ b/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy @@ -43,11 +43,11 @@ public class UploadManager { String infoHashString = new String(infoHashStringBytes, StandardCharsets.US_ASCII) log.info("Responding to upload request for root $infoHashString") - byte [] infoHashRoot = Base64.decode(infoHashStringBytes) + byte [] infoHashRoot = Base64.decode(infoHashString) Set sharedFiles = fileManager.getSharedFiles(infoHashRoot) if (sharedFiles == null || sharedFiles.isEmpty()) { log.info "file not found" - e.getOutputStream().write("404 File Not Found".getBytes(StandardCharsets.US_ASCII)) + e.getOutputStream().write("404 File Not Found\r\n\r\n".getBytes(StandardCharsets.US_ASCII)) e.getOutputStream().flush() e.close() return