From 1b73963eeae5fa72f7518972af493bfec71db086 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Thu, 1 Feb 2024 08:59:54 +0100 Subject: [PATCH] Fix CachedHandlerTest.testFsFromInMemory on Windows (#8318) Signed-off-by: tvallin --- .../webserver/staticcontent/FileSystemContentHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver/static-content/src/main/java/io/helidon/webserver/staticcontent/FileSystemContentHandler.java b/webserver/static-content/src/main/java/io/helidon/webserver/staticcontent/FileSystemContentHandler.java index 0fa1f5102ac..d0ab9570794 100644 --- a/webserver/static-content/src/main/java/io/helidon/webserver/staticcontent/FileSystemContentHandler.java +++ b/webserver/static-content/src/main/java/io/helidon/webserver/staticcontent/FileSystemContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023 Oracle and/or its affiliates. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,7 +79,7 @@ boolean doHandle(Method method, String requestedPath, ServerRequest req, ServerR String rawPath = req.prologue().uriPath().rawPath(); - String relativePath = root.relativize(path).toString(); + String relativePath = root.relativize(path).toString().replace("\\", "/"); String requestedResource; if (mapped) { requestedResource = relativePath;