Skip to content

Commit

Permalink
Fixes #7348 - Slow CONNECT request causes NPE (#7349)
Browse files Browse the repository at this point in the history
Updates after review.

Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Jan 6, 2022
1 parent 9d2f621 commit 20348d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jetty-http/src/main/java/org/eclipse/jetty/http/MetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@

public class MetaData implements Iterable<HttpField>
{
/**
* <p>Returns whether the given HTTP request method and HTTP response status code
* identify a successful HTTP CONNECT tunnel.</p>
*
* @param method the HTTP request method
* @param status the HTTP response status code
* @return whether method and status identify a successful HTTP CONNECT tunnel
*/
public static boolean isTunnel(String method, int status)
{
return HttpMethod.CONNECT.is(method) && HttpStatus.isSuccess(status);
Expand Down

0 comments on commit 20348d7

Please sign in to comment.