You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/04/18 05:55:34 UTC

[httpcomponents-core] branch 5.0.x updated: HTTPCORE-673: fixes incorrect handling of unknown parameters in HTTP/2 SETTINGS frame

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch 5.0.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/5.0.x by this push:
     new 73e848d  HTTPCORE-673: fixes incorrect handling of unknown parameters in HTTP/2 SETTINGS frame
73e848d is described below

commit 73e848d74e77bee5e75ea8bff76e301eafd35a83
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Tue Apr 13 21:01:09 2021 +0200

    HTTPCORE-673: fixes incorrect handling of unknown parameters in HTTP/2 SETTINGS frame
---
 .../org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
index 67d5db2..1b3774c 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
@@ -1126,9 +1126,9 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
         final H2Config.Builder configBuilder = H2Config.initial();
         while (payload.hasRemaining()) {
             final int code = payload.getShort();
+            final int value = payload.getInt();
             final H2Param param = H2Param.valueOf(code);
             if (param != null) {
-                final int value = payload.getInt();
                 switch (param) {
                     case HEADER_TABLE_SIZE:
                         try {