jira-importer opened a new issue, #1346:
URL: https://github.com/apache/httpcomponents-core/issues/1346

   **[seongsu 
shin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER315337)**
 opened 
**[HTTPCORE-804](https://issues.apache.org/jira/browse/HTTPCORE-804?redirect=false)**
 and commented
   
   H2Config.copy(config) leaves out maxContinuations, so the copied builder 
goes back to the default of 100.
   
   ```java
   H2Config config = H2Config.custom().setMaxContinuations(5).build();
   H2Config.copy(config).build().getMaxContinuations(); // 100, expected 5
   ```
   
   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.
   
   
   ---
   
   **Backported to:** 
[5.4.5](https://github.com/apache/httpcomponents-core/milestone/108?closed=1)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to