Package io.netty.handler.codec.http
Class DefaultLastHttpContent
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpContent
io.netty.handler.codec.http.DefaultLastHttpContent
- All Implemented Interfaces:
io.netty.buffer.ByteBufHolder,io.netty.handler.codec.DecoderResultProvider,HttpContent,HttpObject,LastHttpContent,io.netty.util.ReferenceCounted
The default
LastHttpContent implementation.-
Field Summary
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty, last HTTP content message.DefaultLastHttpContent(io.netty.buffer.ByteBuf content) Create a new last HTTP content message with the given contents.DefaultLastHttpContent(io.netty.buffer.ByteBuf content, boolean validateHeaders) Deprecated.DefaultLastHttpContent(io.netty.buffer.ByteBuf content, HttpHeaders trailingHeaders) Create a new last HTTP content message with the given contents, and trailing headers.DefaultLastHttpContent(io.netty.buffer.ByteBuf content, HttpHeadersFactory trailersFactory) Create a new last HTTP content message with the given contents, and trailing headers from the given factory. -
Method Summary
Methods inherited from class io.netty.handler.codec.http.DefaultHttpContent
content, refCnt, release, releaseMethods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, equals, getDecoderResult, hashCode, setDecoderResultMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.buffer.ByteBufHolder
contentMethods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResultMethods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResultMethods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
Constructor Details
-
DefaultLastHttpContent
public DefaultLastHttpContent()Create a new empty, last HTTP content message. -
DefaultLastHttpContent
public DefaultLastHttpContent(io.netty.buffer.ByteBuf content) Create a new last HTTP content message with the given contents. -
DefaultLastHttpContent
Deprecated.Prefer theDefaultLastHttpContent(ByteBuf)constructor instead, to always have header validation enabled.Create a new last HTTP content message with the given contents, and optional trailing header validation.Warning! Setting
validateHeaderstofalsewill mean that Netty won't validate invalid input: '&' protect against user-supplied header values that are malicious. This can leave your server implementation vulnerable to CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting') . When disabling this validation, it is the responsibility of the caller to ensure that the values supplied do not contain a non-url-escaped carriage return (CR) and/or line feed (LF) characters. -
DefaultLastHttpContent
Create a new last HTTP content message with the given contents, and trailing headers from the given factory. -
DefaultLastHttpContent
Create a new last HTTP content message with the given contents, and trailing headers.
-
-
Method Details
-
copy
- Specified by:
copyin interfaceio.netty.buffer.ByteBufHolder- Specified by:
copyin interfaceHttpContent- Specified by:
copyin interfaceLastHttpContent- Overrides:
copyin classDefaultHttpContent
-
duplicate
- Specified by:
duplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
duplicatein interfaceHttpContent- Specified by:
duplicatein interfaceLastHttpContent- Overrides:
duplicatein classDefaultHttpContent
-
retainedDuplicate
- Specified by:
retainedDuplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainedDuplicatein interfaceHttpContent- Specified by:
retainedDuplicatein interfaceLastHttpContent- Overrides:
retainedDuplicatein classDefaultHttpContent
-
replace
- Specified by:
replacein interfaceio.netty.buffer.ByteBufHolder- Specified by:
replacein interfaceHttpContent- Specified by:
replacein interfaceLastHttpContent- Overrides:
replacein classDefaultHttpContent
-
retain
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classDefaultHttpContent
-
retain
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classDefaultHttpContent
-
touch
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classDefaultHttpContent
-
touch
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classDefaultHttpContent
-
trailingHeaders
- Specified by:
trailingHeadersin interfaceLastHttpContent
-
toString
- Overrides:
toStringin classDefaultHttpContent
-
DefaultLastHttpContent(ByteBuf)constructor instead, to always have header validation enabled.