--- old/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java 2018-01-12 18:51:03.000000000 +0000 +++ new/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java 2018-01-12 18:51:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -428,9 +428,10 @@ Log.logRequest("PUSH_PROMISE: " + pushReq.toString()); } PushGroup pushGroup = exchange.getPushGroup(); - if (pushGroup == null || pushGroup.noMorePushes()) { - cancelImpl(new IllegalStateException("unexpected push promise" - + " on stream " + streamid)); + if (pushGroup == null) { + Log.logTrace("Rejecting push promise stream " + streamid); + connection.resetStream(pushStream.streamid, ResetFrame.REFUSED_STREAM); + pushStream.close(); return; }