From 75bec1e7464ad1c4a6b255a7c1f2eac38d0371e3 Mon Sep 17 00:00:00 2001 From: David Matejcek Date: Wed, 18 Nov 2020 13:23:10 +0100 Subject: [PATCH] Issue #2016 Prevent HTTP/2 push when globally disabled Streams still allowed pushing resources when globally disabled as the stream itself and the session both allow it. This change makes the stream also respect the global configuration. Signed-off-by: Matthew Gill Signed-off-by: David Matejcek --- .../main/java/org/glassfish/grizzly/http2/Http2Session.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/http2/src/main/java/org/glassfish/grizzly/http2/Http2Session.java b/modules/http2/src/main/java/org/glassfish/grizzly/http2/Http2Session.java index 01022c32a8..b2214a8cfb 100644 --- a/modules/http2/src/main/java/org/glassfish/grizzly/http2/Http2Session.java +++ b/modules/http2/src/main/java/org/glassfish/grizzly/http2/Http2Session.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2020 Oracle and/or its affiliates and others. + * All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -489,7 +490,7 @@ void setPeerMaxConcurrentStreams(int peerMaxConcurrentStreams) { * Push is enabled by default. */ public boolean isPushEnabled() { - return pushEnabled; + return pushEnabled && http2Configuration.isPushEnabled(); } /**