Package org.swisspush.gateleen.core.util
Class HttpHeaderUtil
- java.lang.Object
-
- org.swisspush.gateleen.core.util.HttpHeaderUtil
-
public class HttpHeaderUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HttpHeaderUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends io.vertx.core.MultiMap>
java.lang.StringgetHeaderValue(T headers, java.lang.String headerKey)Helper method to find the first occurrence of a http header within the given List of headers.static <T extends io.vertx.core.MultiMap>
TremoveNonForwardHeaders(T headers)Removes headers which MUST NOT be forwarded by proxies.
-
-
-
Method Detail
-
removeNonForwardHeaders
public static <T extends io.vertx.core.MultiMap> T removeNonForwardHeaders(T headers)
Removes headers which MUST NOT be forwarded by proxies.
- This MAY modifies the passed headers.
- This MAY returns the same (modified) instance as passed.
- Parameters:
headers- The headers to check.- See Also:
- RFC 2616 section 14.10
-
getHeaderValue
public static <T extends io.vertx.core.MultiMap> java.lang.String getHeaderValue(T headers, java.lang.String headerKey)Helper method to find the first occurrence of a http header within the given List of headers.- Parameters:
headers- The Map with the header key - value pairs to be evaluatedheaderKey- The key for the header pair we are searching for in the given map. Note that the key searching is non case sensitive.- Returns:
- The found header value or null if none found
-
-