arturobernalg commented on code in PR #713:
URL:
https://github.com/apache/httpcomponents-core/pull/713#discussion_r4164790652
##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java:
##########
@@ -1268,17 +1263,18 @@ private void consumeSettingsFrame(final ByteBuffer
payload) throws IOException {
final H2Param param = H2Param.valueOf(code);
if (param != null) {
validateSetting(param, value);
+ final int boundedValue = value < 0 ? Integer.MAX_VALUE : value;
Review Comment:
> @arturobernalg Are you sure this is the right thing to do? This just
reduced 32 bit value to 31 bit and makes it impossible to distinguish with the
highest bit set. Java signed `long` is all we have unless we want to use
BigInteger to represent the setting value with full 32 bit range.
>
> What does bounding of the setting value to 31 bit really give us?
@ok2c Good point. I’ve made the unsigned conversion explicit and only clamp
when mapping the wire value into the existing int-based H2Config.
--
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]