mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 11:29:29 +00:00
444721 - PushCacheFilter cleanup/improvements.
Only associating secondary resources that have been requested with a GET.
This commit is contained in:
parent
599ab9bb1b
commit
3169e3becf
@ -156,10 +156,12 @@ public class PushCacheFilter implements Filter
|
||||
if (port <= 0)
|
||||
port = request.isSecure() ? 443 : 80;
|
||||
|
||||
boolean referred_from_here = _hosts.size() > 0 ? _hosts.contains(host) : host.equals(request.getServerName());
|
||||
referred_from_here &= _ports.size() > 0 ? _ports.contains(port) : port == request.getServerPort();
|
||||
boolean referredFromHere = _hosts.size() > 0 ? _hosts.contains(host) : host.equals(request.getServerName());
|
||||
referredFromHere &= _ports.size() > 0 ? _ports.contains(port) : port == request.getServerPort();
|
||||
|
||||
if (referred_from_here)
|
||||
if (referredFromHere)
|
||||
{
|
||||
if ("GET".equalsIgnoreCase(request.getMethod()))
|
||||
{
|
||||
String referrerPath = referrerURI.getPath();
|
||||
if (referrerPath.startsWith(request.getContextPath()))
|
||||
@ -199,6 +201,7 @@ public class PushCacheFilter implements Filter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
|
Loading…
x
Reference in New Issue
Block a user