basic push cache filter
This commit is contained in:
parent
6b9a069d9d
commit
4d7ead76ce
|
@ -76,7 +76,7 @@ public class HttpFields implements Iterable<HttpField>
|
|||
*/
|
||||
public HttpFields(HttpFields fields)
|
||||
{
|
||||
_fields=Arrays.copyOf(fields._fields,_fields.length+10);
|
||||
_fields=Arrays.copyOf(fields._fields,fields._fields.length+10);
|
||||
_size=fields._size;
|
||||
}
|
||||
|
||||
|
|
|
@ -236,6 +236,12 @@ public class Dispatcher implements RequestDispatcher
|
|||
|
||||
baseRequest.getHttpChannel().getHttpTransport().push(push);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("Dispatcher@0x%x{%s,%s}",hashCode(),_named,_uri);
|
||||
}
|
||||
|
||||
private void commitResponse(ServletResponse response, Request baseRequest) throws IOException
|
||||
{
|
||||
|
|
|
@ -18,6 +18,15 @@
|
|||
<listener-class>com.acme.TestListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<filter>
|
||||
<filter-name>PushFilter</filter-name>
|
||||
<filter-class>org.eclipse.jetty.servlets.PushCacheFilter</filter-class>
|
||||
<async-supported>true</async-supported>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>PushFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter>
|
||||
<filter-name>QoSFilter</filter-name>
|
||||
|
|
|
@ -158,6 +158,7 @@ public class TestServer
|
|||
server.setStopAtShutdown(true);
|
||||
|
||||
WebAppContext webapp = new WebAppContext();
|
||||
webapp.setContextPath("/test");
|
||||
webapp.setParentLoaderPriority(true);
|
||||
webapp.setResourceBase("./src/main/webapp");
|
||||
webapp.setAttribute("testAttribute","testValue");
|
||||
|
|
Loading…
Reference in New Issue