Issue #1472
This commit is contained in:
parent
2ba44ac058
commit
509f59c32d
jetty-server/src/main/java/org/eclipse/jetty/server
|
@ -82,7 +82,7 @@ public class ResourceContentFactory implements ContentFactory
|
||||||
{
|
{
|
||||||
String compressedPathInContext = pathInContext + format._extension;
|
String compressedPathInContext = pathInContext + format._extension;
|
||||||
Resource compressedResource = _factory.getResource(compressedPathInContext);
|
Resource compressedResource = _factory.getResource(compressedPathInContext);
|
||||||
if (compressedResource.exists() && compressedResource.lastModified() >= resource.lastModified()
|
if (compressedResource != null && compressedResource.exists() && compressedResource.lastModified() >= resource.lastModified()
|
||||||
&& compressedResource.length() < resource.length())
|
&& compressedResource.length() < resource.length())
|
||||||
compressedContents.put(format,
|
compressedContents.put(format,
|
||||||
new ResourceHttpContent(compressedResource,_mimeTypes.getMimeByExtension(compressedPathInContext),maxBufferSize));
|
new ResourceHttpContent(compressedResource,_mimeTypes.getMimeByExtension(compressedPathInContext),maxBufferSize));
|
||||||
|
|
Loading…
Reference in New Issue