Skip to content

Commit

Permalink
Removed work-around for an incompatibility in HTTP/2 frame management…
Browse files Browse the repository at this point in the history
… with older versions of Nginx
  • Loading branch information
ok2c committed Oct 22, 2024
1 parent 8ea9ff8 commit 957a823
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,7 @@ abstract H2StreamHandler createLocallyInitiatedStream(
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);
}
Expand Down

0 comments on commit 957a823

Please sign in to comment.