< prev index next >

src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 2017, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 426,438 **** { if (Log.requests()) { Log.logRequest("PUSH_PROMISE: " + pushReq.toString()); } PushGroup<?,T> pushGroup = exchange.getPushGroup(); ! if (pushGroup == null || pushGroup.noMorePushes()) { ! cancelImpl(new IllegalStateException("unexpected push promise" ! + " on stream " + streamid)); return; } HttpResponse.MultiSubscriber<?,T> proc = pushGroup.subscriber(); --- 426,439 ---- { if (Log.requests()) { Log.logRequest("PUSH_PROMISE: " + pushReq.toString()); } PushGroup<?,T> pushGroup = exchange.getPushGroup(); ! if (pushGroup == null) { ! Log.logTrace("Rejecting push promise stream " + streamid); ! connection.resetStream(pushStream.streamid, ResetFrame.REFUSED_STREAM); ! pushStream.close(); return; } HttpResponse.MultiSubscriber<?,T> proc = pushGroup.subscriber();
< prev index next >