[ 
https://issues.apache.org/jira/browse/HTTPCORE-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lubos Husivarga updated HTTPCORE-707:
-------------------------------------
    Description: 
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.

  was:
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 solution: AbstractH2StreamMultiplexer.{*}applyRemoteSettings{*}(...) updates 
the outputBuffer's max frame size based on remote config. Since 
FrameOutputBuffer has the max frame size property final, I had to remove the 
final. Not sure whether it could break something later on :)

 

I will appreciate any better solution to this, as it is really annoying issue 
depending on remote site config and payload size, so may be spotted randomly.


> 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to