RFR: 8263031: HttpClient throws Exception if it receives a Push Promise that is too large [v6]

Conor Cleary ccleary at openjdk.java.net
Fri Mar 25 15:58:50 UTC 2022


On Fri, 25 Mar 2022 15:51:44 GMT, Conor Cleary <ccleary at openjdk.org> wrote:

>> src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java line 807:
>> 
>>> 805:                     } catch (UncheckedIOException e) {
>>> 806:                         debug.log("Error handling Push Promise with Continuation: " + e.getMessage(), e);
>>> 807:                         protocolError(ResetFrame.PROTOCOL_ERROR, e.getMessage());
>> 
>> I believe it would more clear to use `ErrorFrame.PROTOCOL_ERROR` or `GoAwayFrame.PROTOCOL_ERRROR` here and in the other calls to protocolError below, since we're not resetting the stream here but closing the whole connection with a `GoAwayFrame`.
>
> Oh yes, good point. I think `ErrorFrame.PROTOCOL_ERROR` would be the most appropriate here. I'll amend the change accordingly.

However, I'll look into the specification further for the other cases and see if they need be changed as well. Though closing the whole connection with `GoAwayFrame` seems correct

-------------

PR: https://git.openjdk.java.net/jdk/pull/7696


More information about the net-dev mailing list