Package io.netty.handler.codec.http
Class CombinedHttpHeaders
- java.lang.Object
-
- io.netty.handler.codec.http.HttpHeaders
-
- io.netty.handler.codec.http.DefaultHttpHeaders
-
- io.netty.handler.codec.http.CombinedHttpHeaders
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>
public class CombinedHttpHeaders extends DefaultHttpHeaders
Will add multiple values for the same header as single header with a comma separated list of values.Please refer to section RFC 7230, 3.2.2.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.handler.codec.http.HttpHeaders
HttpHeaders.Names, HttpHeaders.Values
-
-
Field Summary
-
Fields inherited from class io.netty.handler.codec.http.HttpHeaders
EMPTY_HEADERS
-
-
Constructor Summary
Constructors Constructor Description CombinedHttpHeaders(boolean validate)Deprecated.Prefer instead to configuring aHttpHeadersFactoryby callingwithCombiningHeaders(true)onDefaultHttpHeadersFactory.headersFactory().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsValue(java.lang.CharSequence name, java.lang.CharSequence value, boolean ignoreCase)Returnstrueif a header with thenameandvalueexists,falseotherwise.-
Methods inherited from class io.netty.handler.codec.http.DefaultHttpHeaders
add, add, add, add, add, addInt, addShort, clear, contains, contains, contains, contains, copy, entries, equals, get, get, getAll, getAll, getInt, getInt, getShort, getShort, getTimeMillis, getTimeMillis, hashCode, isEmpty, iterator, iteratorCharSequence, names, remove, remove, set, set, set, set, set, setInt, setShort, size, unwrap, valueCharSequenceIterator, valueStringIterator
-
Methods inherited from class io.netty.handler.codec.http.HttpHeaders
addDateHeader, addDateHeader, addHeader, addHeader, addIntHeader, addIntHeader, clearHeaders, encodeAscii, equalsIgnoreCase, get, getAllAsString, getAsString, getContentLength, getContentLength, getDate, getDate, getDateHeader, getDateHeader, getDateHeader, getDateHeader, getHeader, getHeader, getHeader, getHeader, getHost, getHost, getIntHeader, getIntHeader, getIntHeader, getIntHeader, is100ContinueExpected, isContentLengthSet, isKeepAlive, isTransferEncodingChunked, iteratorAsString, newEntity, removeHeader, removeHeader, removeTransferEncodingChunked, set100ContinueExpected, set100ContinueExpected, setAll, setContentLength, setDate, setDateHeader, setDateHeader, setDateHeader, setDateHeader, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntHeader, setIntHeader, setIntHeader, setIntHeader, setKeepAlive, setTransferEncodingChunked, toString
-
-
-
-
Constructor Detail
-
CombinedHttpHeaders
@Deprecated public CombinedHttpHeaders(boolean validate)
Deprecated.Prefer instead to configuring aHttpHeadersFactoryby callingwithCombiningHeaders(true)onDefaultHttpHeadersFactory.headersFactory().Create a combined HTTP header object, with optional validation.- Parameters:
validate- Should Netty validate header values to ensure they aren't malicious.
-
-
Method Detail
-
containsValue
public boolean containsValue(java.lang.CharSequence name, java.lang.CharSequence value, boolean ignoreCase)Description copied from class:HttpHeadersReturnstrueif a header with thenameandvalueexists,falseotherwise. This also handles multiple values that are separated with a,.If
ignoreCaseistruethen a case insensitive compare is done on the value.- Overrides:
containsValuein classHttpHeaders- Parameters:
name- the name of the header to findvalue- the value of the header to findignoreCase-truethen a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.
-
-