[ 
https://issues.apache.org/jira/browse/HTTPCORE-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467147#comment-17467147
 ] 

Oleg Kalnichevski commented on HTTPCORE-707:
--------------------------------------------

[~lhusivarga] Here's the problem. Based on my reading of the HTTP/2 spec the 
opposite endpoint is not supposed to send frames larger than what the local 
endpoint is willing to accept. I will do another scan through the relevant 
sections of the specification but so far the behavior of HttpClient looks 
correct. If the client has specified the max frame size it is willing to work 
with during the SETTING handshake the server may not send frames with size 
larger than the max size specified by the client. The server can however 
indicate that it can handle different (larger) frames if the client is capable 
of generating them.

The log is not terribly helpful as it is missing HTTP/2 specific details. 
Please re-run the same test with the following log priorities and attache the 
resultant log
{noformat}
<Logger name="org.apache.hc.client5.http2" level="debug"/>
<Logger name="org.apache.hc.client5.http2.frame" level="debug"/>
<Logger name="org.apache.hc.client5.http2.frame.payload" level="debug"/>
{noformat}

Oleg  

> AbstractH2StreamMultiplexer: FrameOutputBuffer: Frame size exceeds maximum
> --------------------------------------------------------------------------
>
>                 Key: HTTPCORE-707
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-707
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 5.2-alpha1
>            Reporter: Lubos Husivarga
>            Priority: Major
>         Attachments: context_wire_log.txt
>
>
> AbstractH2StreamMultiplexer initializes outputBuffer with frame size from 
> local config:
> _this.outputBuffer = new FrameOutputBuffer(this.outputMetrics, 
> this.{*}localConfig{*}.getMaxFrameSize());_
>  
> Data are streamed using streamData(...) method which checks maxPayloadSize 
> against remote config:
> _final int maxPayloadSize = Math.min(capacity, 
> {*}remoteConfig{*}.getMaxFrameSize());_
>  
> Issue: When remote config has greater max frame size than local config and 
> the payload is also greater than local max frame size, the FrameOutputBuffer 
> throws "Frame size exceeds maximum" error, since it compares the payload size 
> against local frame size as it was initialized with it, not remote frame size.
>  
> My suggestion: AbstractH2StreamMultiplexer.{*}applyRemoteSettings{*}(...) 
> should update the outputBuffer's max frame size based on remote config.
>  
> I will appreciate your help, as it is really annoying issue depending on 
> remote site config and payload size, so it may be spotted randomly.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to