Skip to content

Commit

Permalink
Fixes #7935 - Review HTTP/2 error handling
Browse files Browse the repository at this point in the history
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed May 1, 2022
1 parent f78f92e commit 569be44
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -82,11 +82,8 @@ public void handle(String target, Request jettyRequest, HttpServletRequest reque
});

// Remove existing ErrorHandlers.
while (true)
for (ErrorHandler errorHandler : server.getBeans(ErrorHandler.class))
{
ErrorHandler errorHandler = server.getBean(ErrorHandler.class);
if (errorHandler == null)
break;
server.removeBean(errorHandler);
}

Expand All @@ -95,7 +92,6 @@ public void handle(String target, Request jettyRequest, HttpServletRequest reque
@Override
public ByteBuffer badMessageError(int status, String reason, HttpFields.Mutable fields)
{
// TODO: flow control should be enough.
// Return a very large buffer that will cause HTTP/2 flow control exhaustion and/or TCP congestion.
return ByteBuffer.allocateDirect(128 * 1024 * 1024);
}
Expand Down

0 comments on commit 569be44

Please sign in to comment.