Class HttpContinue

java.lang.Object
io.undertow.server.protocol.http.HttpContinue

public class HttpContinue extends Object
Class that provides support for dealing with HTTP 100 (Continue) responses.

Note that if a client is pipelining some requests and sending continue for others this could cause problems if the pipelining buffer is enabled.

Author:
Stuart Douglas
  • Field Details

  • Constructor Details

    • HttpContinue

      public HttpContinue()
  • Method Details

    • requiresContinueResponse

      public static boolean requiresContinueResponse(HttpServerExchange exchange)
      Returns true if this exchange requires the server to send a 100 (Continue) response.
      Parameters:
      exchange - The exchange
      Returns:
      true if the server needs to send a continue response
    • requiresContinueResponse

      public static boolean requiresContinueResponse(HeaderMap requestHeaders)
    • isContinueResponseSent

      public static boolean isContinueResponseSent(HttpServerExchange exchange)
    • sendContinueResponse

      public static void sendContinueResponse(HttpServerExchange exchange, IoCallback callback)
      Sends a continuation using async IO, and calls back when it is complete.
      Parameters:
      exchange - The exchange
      callback - The completion callback
    • createResponseSender

      public static HttpContinue.ContinueResponseSender createResponseSender(HttpServerExchange exchange) throws IOException
      Creates a response sender that can be used to send a HTTP 100-continue response.
      Parameters:
      exchange - The exchange
      Returns:
      The response sender
      Throws:
      IOException
    • markContinueResponseSent

      public static void markContinueResponseSent(HttpServerExchange exchange)
      Marks a continue response as already having been sent. In general this should only be used by low level handlers than need fine grained control over the continue response.
      Parameters:
      exchange - The exchange
    • sendContinueResponseBlocking

      public static void sendContinueResponseBlocking(HttpServerExchange exchange) throws IOException
      Sends a continue response using blocking IO
      Parameters:
      exchange - The exchange
      Throws:
      IOException
    • rejectExchange

      public static void rejectExchange(HttpServerExchange exchange)
      Sets a 417 response code and ends the exchange.
      Parameters:
      exchange - The exchange to reject