The connection header logic to use for the result.
No Connection
header should be sent.
No Connection
header should be sent. Used on an HTTP 1.0
connection where the default behavior is to close the connection,
or when the response already has a Connection: close header.
No Connection
header should be sent.
No Connection
header should be sent. Used on an HTTP 1.1
connection where the default behavior is to keep the connection
open.
A Connection: close
header should be sent.
A Connection: close
header should be sent. Used to
force an HTTP 1.1 connection to close.
A Connection: keep-alive
header should be sent.
A Connection: keep-alive
header should be sent. Used to
force an HTTP 1.0 connection to remain open.
Cancel the entity.
Cancel the entity.
While theoretically, an Akka streams Source is not supposed to hold resources, in practice, this is very often not the case, for example, the response from an Akka HTTP client may have an associated Source that must be consumed (or cancelled) before the associated connection can be returned to the connection pool.
Update the result's Set-Cookie header so that it removes any Flash cookies we received in the incoming request.
Determine whether the connection should be closed, and what header, if any, should be added to the response.
Whether the given status may have an entity or not.
Handles result conversion in a safe way.
Handles result conversion in a safe way.
1. Tries to convert the Result
.
2. If there's an error, calls the HttpErrorHandler
to get a new
Result
, then converts that.
3. If there's an error with *that* Result
, uses the
DefaultHttpErrorHandler
to get another Result
, then converts
that.
4. Hopefully there are no more errors. :)
5. If calling an HttpErrorHandler
throws an exception, then a
fallback response is returned, without an conversion.
Given a map of headers, split it into a sequence of individual headers.
Given a map of headers, split it into a sequence of individual headers.
Most headers map into a single pair in the new sequence. The exception is
the Set-Cookie
header which we split into a pair for each cookie it
contains. This allows us to work around issues with clients that can't
handle combined headers. (Also RFC6265 says multiple headers shouldn't
be folded together, which Play's API unfortunately does.)
Validate the result.
Validate the result.
Returns the validated result, which may be an error result if validation failed.