From ce67192399acfecbcfdd4b108c98d601531b3968 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 30 May 2017 22:13:25 +0200 Subject: [PATCH] Fixed determining mime type of `PathResource` based on its file name. (#1532) --- .../org/eclipse/jetty/util/resource/PathResource.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java index 446585b4f4b..4c6d2d7d9ac 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java @@ -201,13 +201,10 @@ public class PathResource extends Resource return path.toAbsolutePath().toString(); } - @Override - public String toString() { - // Note: The org.eclipse.jetty.server.ResourceCache.Content uses #toString() instead of - // #getName() for determining the file name for mime type resolution based on the file name - // extension. - return _path.toString(); - } + @Override + public String toString() { + return path.toString(); + } @Override public ReadableByteChannel getReadableByteChannel() throws IOException