Package io.undertow.server.protocol.http
Class HttpAttachments
- java.lang.Object
-
- io.undertow.server.protocol.http.HttpAttachments
-
public class HttpAttachments extends Object
Exchange attachments that have specific meaning when using the HTTP protocol- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static AttachmentKey<Boolean>
PRE_CHUNKED_RESPONSE
If the valuetrue
is attached to the exchange under this key then Undertow will assume that the underlying application has already taken care of chunking, and will not attempt to add its own chunk markers.static AttachmentKey<HeaderMap>
REQUEST_TRAILERS
Attachment key for request trailers when using chunked encoding.static AttachmentKey<Supplier<HeaderMap>>
RESPONSE_TRAILER_SUPPLIER
Attachment key for a supplier response trailers.static AttachmentKey<HeaderMap>
RESPONSE_TRAILERS
Attachment key for response trailers.
-
Constructor Summary
Constructors Constructor Description HttpAttachments()
-
-
-
Field Detail
-
REQUEST_TRAILERS
public static final AttachmentKey<HeaderMap> REQUEST_TRAILERS
Attachment key for request trailers when using chunked encoding. When the request is parsed the trailers will be attached under this key.
-
RESPONSE_TRAILERS
public static final AttachmentKey<HeaderMap> RESPONSE_TRAILERS
Attachment key for response trailers. If a header map is attached under this key then the contents will be written out at the end of the chunked request or HTTP/2 response. Note that the results ofRESPONSE_TRAILERS
andRESPONSE_TRAILER_SUPPLIER
will be merged if both exit with the value supplied by the supplier taking precedence. Note that if pre chunked streams are being used then the trailers will not be appended to the response, however any trailers parsed out of the chunked stream will be attached here instead.
-
RESPONSE_TRAILER_SUPPLIER
public static final AttachmentKey<Supplier<HeaderMap>> RESPONSE_TRAILER_SUPPLIER
Attachment key for a supplier response trailers. If a header map is attached under this key then the contents will be written out at the end of the chunked request or HTTP/2 response. Note that the results ofRESPONSE_TRAILERS
andRESPONSE_TRAILER_SUPPLIER
will be merged if both exit with the value supplied by the supplier taking precedence. Note that if pre chunked streams are being used then the trailers will not be appended to the response, however any trailers parsed out of the chunked stream will be attached here instead.
-
PRE_CHUNKED_RESPONSE
public static final AttachmentKey<Boolean> PRE_CHUNKED_RESPONSE
If the valuetrue
is attached to the exchange under this key then Undertow will assume that the underlying application has already taken care of chunking, and will not attempt to add its own chunk markers. This will only take effect if the application has explicitly set the Transfer-Encoding: chunked header.
-
-