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 2024/10/20 19:43:00 UTC
(httpcomponents-core) 03/03: Removed work-around for an incompatibility in HTTP/2 frame management with older versions of Nginx
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 66db56a681bc4837c25137774833dc5fd0de54d8
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sun Oct 20 15:50:37 2024 +0200
Removed work-around for an incompatibility in HTTP/2 frame management with older versions of Nginx
---
.../hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
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 91f1715b3..f7792f8aa 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
@@ -201,15 +201,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
private int updateWindow(final AtomicInteger window, final int delta) throws ArithmeticException {
for (;;) {
final int current = window.get();
- long newValue = (long) current + delta;
-
- //TODO: work-around for what looks like a bug in Ngnix (1.11)
- // Tolerate if the update window exceeded by one
- if (newValue == 0x80000000L) {
- newValue = Integer.MAX_VALUE;
- }
- //TODO: needs to be removed
-
+ final long newValue = (long) current + delta;
if (Math.abs(newValue) > 0x7fffffffL) {
throw new ArithmeticException("Update causes flow control window to exceed " + Integer.MAX_VALUE);
}