From 90ccfbd7875b7f1438f8b4268010e40b2c91b645 Mon Sep 17 00:00:00 2001 From: ulrich Date: Thu, 07 Nov 2024 14:45:47 +0000 Subject: [PATCH] Statuscode ergaenzt --- src/de/uhilger/neon/FileServer.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/uhilger/neon/FileServer.java b/src/de/uhilger/neon/FileServer.java index b768961..b38245a 100644 --- a/src/de/uhilger/neon/FileServer.java +++ b/src/de/uhilger/neon/FileServer.java @@ -58,9 +58,13 @@ String fName = exchange.getRequestURI().getPath(); try { fName = new HttpHelper().getFileName(exchange); - File fileToDeliver = new File((String) exchange + String fBase = (String) exchange .getHttpContext().getAttributes() - .getOrDefault(ATTR_FILE_BASE, STR_EMPTY), fName); + .getOrDefault(ATTR_FILE_BASE, STR_EMPTY); + //File fileToDeliver = new File((String) exchange + // .getHttpContext().getAttributes() + // .getOrDefault(ATTR_FILE_BASE, STR_EMPTY), fName); + File fileToDeliver = new File(fBase, fName); Headers headers = exchange.getRequestHeaders(); if (headers.containsKey(RANGE_HEADER)) { new PartialFileServer().serveFileParts(exchange, fileToDeliver); -- Gitblit v1.9.3