small fixes

pull/4/head
Zlatin Balevsky 2019-05-29 11:25:35 +01:00
parent fd100ae373
commit 380ec45bba
1 changed files with 2 additions and 2 deletions

View File

@ -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<SharedFile> 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