Package io.undertow.server.protocol.http
Class HttpContinue
java.lang.Object
io.undertow.server.protocol.http.HttpContinue
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A continue response that is in the process of being sent. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResponseSender
(HttpServerExchange exchange) Creates a response sender that can be used to send a HTTP 100-continue response.static boolean
isContinueResponseSent
(HttpServerExchange exchange) static void
markContinueResponseSent
(HttpServerExchange exchange) Marks a continue response as already having been sent.static void
rejectExchange
(HttpServerExchange exchange) Sets a 417 response code and ends the exchange.static boolean
requiresContinueResponse
(HttpServerExchange exchange) Returns true if this exchange requires the server to send a 100 (Continue) response.static boolean
requiresContinueResponse
(HeaderMap requestHeaders) static void
sendContinueResponse
(HttpServerExchange exchange, IoCallback callback) Sends a continuation using async IO, and calls back when it is complete.static void
Sends a continue response using blocking IO
-
Field Details
-
CONTINUE
- See Also:
-
-
Constructor Details
-
HttpContinue
public HttpContinue()
-
-
Method Details
-
requiresContinueResponse
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
-
isContinueResponseSent
-
sendContinueResponse
Sends a continuation using async IO, and calls back when it is complete.- Parameters:
exchange
- The exchangecallback
- 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
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
Sends a continue response using blocking IO- Parameters:
exchange
- The exchange- Throws:
IOException
-
rejectExchange
Sets a 417 response code and ends the exchange.- Parameters:
exchange
- The exchange to reject
-