[
https://issues.apache.org/jira/browse/HTTPCORE-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18144869#comment-18144869
]
ASF subversion and git services commented on HTTPCORE-804:
----------------------------------------------------------
Commit 25fbb531a3758751a69bb00dc850d5d60d613455 in httpcomponents-core's branch
refs/heads/master from Arturo Bernal
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=25fbb531a ]
HTTPCORE-804: H2Config.copy() does not copy maxContinuations
The copied builder silently reset the limit to the default (100),
even when the source config had a custom value. The only production
caller (WebSocketH2ServerBootstrap, client repo) always goes through
copy() since push is on by default, so a configured limit never took
effect.
> H2Config.copy() does not copy maxContinuations
> ----------------------------------------------
>
> Key: HTTPCORE-804
> URL: https://issues.apache.org/jira/browse/HTTPCORE-804
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Reporter: seongsu shin
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> H2Config.copy(config) leaves out maxContinuations, so the copied builder goes
> back to the default of 100.
> {code:java}
> H2Config config = H2Config.custom().setMaxContinuations(5).build();
> H2Config.copy(config).build().getMaxContinuations(); // 100, expected 5
> {code}
> I ran into this through WebSocketH2ServerBootstrap in httpclient5-websocket.
> When push is enabled, setH2Config() does
> {{H2Config.copy(h2Config).setPushEnabled(false).build()}}. Push is on by
> default, so a server set up with
> {{H2Config.custom().setMaxContinuations(2).build()}} actually runs with a
> limit of 100.
> To check it end to end I started a WebSocketH2ServerBootstrap server
> (FORCE_HTTP_2, maxContinuations=2) and sent one HEADERS frame followed by 14
> CONTINUATION frames from a plain socket:
> ||H2Config passed to setH2Config()||result||
> |pushEnabled=true (goes through copy())|header block accepted, server
> responds on stream 1|
> |pushEnabled=false (used as is)|GOAWAY ENHANCE_YOUR_CALM "Excessive number of
> continuation frames"|
> After adding {{.setMaxContinuations(config.getMaxContinuations())}} to
> copy(), both cases get the GOAWAY.
> Tested with core master (2f7e88e88) and client master (724cf0044).
> The same line is also in PR #695 (ORIGIN frame), but that one is a larger
> change. I can send a small PR with a test for just this if that helps.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]