Package io.micronaut.http
Class CaseInsensitiveMutableHttpHeaders
java.lang.Object
io.micronaut.http.CaseInsensitiveMutableHttpHeaders
- All Implemented Interfaces:
- ConversionServiceAware,- ConversionServiceProvider,- ConvertibleMultiValues<String>,- ConvertibleValues<List<String>>,- Headers,- MutableHeaders,- ValueResolver<CharSequence>,- HttpHeaders,- MutableHttpHeaders,- Iterable<Map.Entry<String,- List<String>>> 
@Internal
public final class CaseInsensitiveMutableHttpHeaders
extends Object
implements MutableHttpHeaders
A 
MutableHttpHeaders implementation that is case-insensitive.- Since:
- 4.0.0
- Author:
- Tim Yates
- 
Field SummaryFields inherited from interface io.micronaut.core.convert.value.ConvertibleValuesEMPTYFields inherited from interface io.micronaut.http.HttpHeadersACCEPT, ACCEPT_CH, ACCEPT_CH_LIFETIME, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_PATCH, ACCEPT_RANGES, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK, ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, ACCESS_CONTROL_REQUEST_PRIVATE_NETWORK, AGE, ALLOW, AUTHORIZATION, AUTHORIZATION_INFO, CACHE_CONTROL, CONNECTION, CONTENT_BASE, CONTENT_DISPOSITION, CONTENT_DPR, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, COOKIE, CROSS_ORIGIN_RESOURCE_POLICY, DATE, DEVICE_MEMORY, DOWNLINK, DPR, ECT, ETAG, EXPECT, EXPIRES, FEATURE_POLICY, FORWARDED, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LINK, LOCATION, MAX_FORWARDS, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, REFERRER_POLICY, RETRY_AFTER, RTT, SAVE_DATA, SEC_WEBSOCKET_ACCEPT, SEC_WEBSOCKET_KEY, SEC_WEBSOCKET_KEY1, SEC_WEBSOCKET_KEY2, SEC_WEBSOCKET_LOCATION, SEC_WEBSOCKET_ORIGIN, SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION, SERVER, SET_COOKIE, SET_COOKIE2, SOURCE_MAP, STANDARD_HEADERS, TE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, VIEWPORT_WIDTH, WARNING, WEBSOCKET_LOCATION, WEBSOCKET_ORIGIN, WEBSOCKET_PROTOCOL, WIDTH, WWW_AUTHENTICATE, X_AUTH_TOKENFields inherited from interface io.micronaut.http.MutableHttpHeadersGMT
- 
Constructor SummaryConstructorsConstructorDescriptionCaseInsensitiveMutableHttpHeaders(boolean validate, ConversionService conversionService) Create an empty CaseInsensitiveMutableHttpHeaders.CaseInsensitiveMutableHttpHeaders(boolean validate, Map<String, List<String>> defaults, ConversionService conversionService) Create a CaseInsensitiveMutableHttpHeaders populated by the entries in the provided Map<String,String>.CaseInsensitiveMutableHttpHeaders(ConversionService conversionService) Create an empty CaseInsensitiveMutableHttpHeaders.CaseInsensitiveMutableHttpHeaders(Map<String, List<String>> defaults, ConversionService conversionService) Create a CaseInsensitiveMutableHttpHeaders populated by the entries in the provided Map<String,String>.
- 
Method SummaryModifier and TypeMethodDescriptionadd(CharSequence header, CharSequence value) Add a header for the given name and value.get(CharSequence name) Get a value without applying any conversion.<T> Optional<T>get(CharSequence name, ArgumentConversionContext<T> conversionContext) Resolve the given property for the given name.getAll(CharSequence name) Get all the values for the given name without applying conversion.names()remove(CharSequence header) Removes a header.voidsetConversionService(ConversionService conversionService) Sets the conversion service.values()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.convert.value.ConvertibleMultiValuesforEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iteratorMethods inherited from interface io.micronaut.core.convert.value.ConvertibleValuesasMap, asMap, asProperties, contains, getConversionService, getValue, getValueType, subMap, subMap, subMapMethods inherited from interface io.micronaut.http.HttpHeadersaccept, acceptCharset, acceptLanguage, contains, contentLength, contentType, findAcceptCharset, findAcceptLanguage, findDate, findFirst, findInt, getAuthorization, getContentType, getDate, getInt, getOrigin, isKeepAliveMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface io.micronaut.core.type.MutableHeaderssetIfMissingMethods inherited from interface io.micronaut.http.MutableHttpHeadersadd, add, allow, allow, allowGeneric, auth, auth, contentType, contentTypeIfMissing, date, date, expires, expires, ifModifiedSince, ifModifiedSince, lastModified, lastModified, location, setMethods inherited from interface io.micronaut.core.value.ValueResolverget, get, get
- 
Constructor Details- 
CaseInsensitiveMutableHttpHeadersCreate an empty CaseInsensitiveMutableHttpHeaders.- Parameters:
- conversionService- The conversion service
 
- 
CaseInsensitiveMutableHttpHeadersCreate an empty CaseInsensitiveMutableHttpHeaders.- Parameters:
- validate- Whether to validate the headers
- conversionService- The conversion service
 
- 
CaseInsensitiveMutableHttpHeaderspublic CaseInsensitiveMutableHttpHeaders(Map<String, List<String>> defaults, ConversionService conversionService) Create a CaseInsensitiveMutableHttpHeaders populated by the entries in the provided Map<String,String>.- Parameters:
- defaults- The defaults
- conversionService- The conversion service
 
- 
CaseInsensitiveMutableHttpHeaderspublic CaseInsensitiveMutableHttpHeaders(boolean validate, Map<String, List<String>> defaults, ConversionService conversionService) Create a CaseInsensitiveMutableHttpHeaders populated by the entries in the provided Map<String,String>.Warning! Setting validatetofalsewill not validate header names and values, and can leave your server implementation vulnerable to CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting').- Parameters:
- validate- Whether to validate the headers
- defaults- The defaults
- conversionService- The conversion service
 
 
- 
- 
Method Details- 
getAllDescription copied from interface:ConvertibleMultiValuesGet all the values for the given name without applying conversion.- Specified by:
- getAllin interface- ConvertibleMultiValues<String>
- Parameters:
- name- The header name
- Returns:
- All the values
 
- 
getDescription copied from interface:ConvertibleMultiValuesGet a value without applying any conversion.- Specified by:
- getin interface- ConvertibleMultiValues<String>
- Parameters:
- name- The name of the value
- Returns:
- The raw value or null
- See Also:
 
- 
names- Specified by:
- namesin interface- ConvertibleValues<List<String>>
- Returns:
- The names of the values
 
- 
values- Specified by:
- valuesin interface- ConvertibleValues<List<String>>
- Returns:
- The values
 
- 
getDescription copied from interface:ValueResolverResolve the given property for the given name.- Specified by:
- getin interface- ValueResolver<CharSequence>
- Type Parameters:
- T- The concrete type
- Parameters:
- name- The name
- conversionContext- The conversion context
- Returns:
- An optional containing the property value if it exists and is able to be converted
 
- 
addDescription copied from interface:MutableHttpHeadersAdd a header for the given name and value.- Specified by:
- addin interface- MutableHeaders
- Specified by:
- addin interface- MutableHttpHeaders
- Parameters:
- header- The header name
- value- The value
- Returns:
- This headers object
 
- 
removeDescription copied from interface:MutableHeadersRemoves a header.- Specified by:
- removein interface- MutableHeaders
- Specified by:
- removein interface- MutableHttpHeaders
- Parameters:
- header- The header to remove
- Returns:
- These headers
 
- 
setConversionServiceDescription copied from interface:ConversionServiceAwareSets the conversion service.- Specified by:
- setConversionServicein interface- ConversionServiceAware
- Parameters:
- conversionService- The conversion service
 
 
-