Fixed determining mime type of `PathResource` based on its file name. (#1532)

This commit is contained in:
Greg Wilkins 2017-05-30 22:13:25 +02:00
parent 5e63c4db62
commit ce67192399
1 changed files with 4 additions and 7 deletions

View File

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