the Filter should attempt to always fully qualify the value of the response 'Location' header. Default: false
Allows extensions to set a different function for setting the Response Location Header
value, e.g., setUnsafe
(which performs no validation) instead of the default set
(which performs validation).
Allows extensions to set a different function for setting the Response Location Header
value, e.g., setUnsafe
(which performs no validation) instead of the default set
(which performs validation).
the com.twitter.finagle.http.HeaderMap on which to set the Location header
the Location header value to set.
the set function to use for setting the value.
HttpResponseFilter does the following:
By default this filter allows for returning relative references as 'Location' header values. In order to always attempt to fully specify a relative reference, this class should be instantiated with the constructor arg fullyQualifyLocationHeader set to 'true'.
This filter does NOT throw exceptions when it is unable to set a location header value because of non RFC 7230 compliant values. Generally this filter is installed "above" the
ExceptionMappingFilter
and therefore translation of an exception into an appropriate HTTP response is not available thus the filter logs a warning message. This means that if there is a non-compliant 'Location' header value in the outgoing Response this filter will not fully qualify, nor replace, nor remove it.Relative Reference
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
HTTP location