I'm trying to modify the value of MaxConcurrentStream for the tomcat server in 
order to check that it returns a STREAM_REFUSED when the client uses more 
streams, but I don't manage to change the default unlimited value.

I've been inspecting the tomcat server code with a debugger and I saw it enters 
the method protected synchronized void set(Setting setting, Long value)  from 
the org.apache.coyote.http2.ConnectionSettingsLocal.java class to change the 
value for maxConcurrentStream. Yet, if I'm not wrong, it only modifies the 
pending hashSet not the current one, which is the one that is checked later on 
to determine if it is lower than the clients' active streams and therefore send 
the  STREAM_REFUSED code.



I'm not sure if  I'm not modifying the value correctly. I use the 
Http2Protocol's method setMaxConcurrentStreams to set the value and then add 
the Http2Protocol to the connector(addUpgradeProtocol).



I'd be grateful if someone could give me a hint of what is going on or what I'm 
doing wrong. Thank you!

Reply via email to