Fixes #1209 - IllegalStateException when HTTP/2 push is disabled.
Aligned the behavior with Servlet 4.0, returning null if push is not supported or disabled by the client.
This commit is contained in:
parent
8d0af35a5f
commit
e2d7057988
|
@ -285,7 +285,7 @@ public class Request implements HttpServletRequest
|
|||
public PushBuilder getPushBuilder()
|
||||
{
|
||||
if (!isPushSupported())
|
||||
throw new IllegalStateException(String.format("%s,push=%b,channel=%s", this, isPush(), getHttpChannel()));
|
||||
return null;
|
||||
|
||||
HttpFields fields = new HttpFields(getHttpFields().size()+5);
|
||||
boolean conditional=false;
|
||||
|
|
Loading…
Reference in New Issue