class HttpResponseFilter[R <: Request] extends SimpleFilter[R, Response]
HttpResponseFilter does the following:
- Sets the 'Server' and 'Date' response header values.
- Optionally turns a relative 'Location' header value into a full URL. See fullyQualifyLocationHeader.
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'.
- Annotations
- @Singleton()
- Note
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.- See also
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- Alphabetic
- By Inheritance
- HttpResponseFilter
- SimpleFilter
- Filter
- Function2
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def agnosticAndThen(next: TypeAgnostic): Filter[R, Response, R, Response]
- Definition Classes
- Filter
- def andThen(factory: ServiceFactory[R, Response]): ServiceFactory[R, Response]
- Definition Classes
- Filter
- def andThen(service: Service[R, Response]): Service[R, Response]
- Definition Classes
- Filter
- def andThen[Req2, Rep2](next: Filter[R, Response, Req2, Rep2]): Filter[R, Response, Req2, Rep2]
- Definition Classes
- Filter
- def andThenIf[Req2 >: R, Rep2 <: Response](condAndFilter: (Boolean, Filter[R, Response, Req2, Rep2])): Filter[R, Response, Req2, Rep2]
- Definition Classes
- Filter
- def andThenIf[Req2 >: R, Rep2 <: Response](conditional: Boolean, filter: Filter[R, Response, Req2, Rep2]): Filter[R, Response, Req2, Rep2]
- Definition Classes
- Filter
- def apply(request: R, service: Service[R, Response]): Future[Response]
- Definition Classes
- HttpResponseFilter → Filter → Function2
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def curried: (R) => (Service[R, Response]) => Future[Response]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def setLocationHeader(headerMap: HeaderMap, value: String): Unit
Allows extensions to set a different function for setting the Response Location Header value, e.g.,
setUnsafe
(which performs no validation) instead of the defaultset
(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 defaultset
(which performs validation).- headerMap
the com.twitter.finagle.http.HeaderMap on which to set the Location header
- value
the Location header value to set.
- returns
the set function to use for setting the value.
- Attributes
- protected
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Filter → Function2 → AnyRef → Any
- def tupled: ((R, Service[R, Response])) => Future[Response]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()