Class

com.twitter.finatra.http.filters

HttpResponseFilter

Related Doc: package filters

Permalink

class HttpResponseFilter[R <: Request] extends SimpleFilter[R, Response] with Logging

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'.

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

Relative Reference

Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

HTTP location

Linear Supertypes
Logging, Logging, SimpleFilter[R, Response], Filter[R, Response, R, Response], (R, Service[R, Response]) ⇒ Future[Response], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpResponseFilter
  2. Logging
  3. Logging
  4. SimpleFilter
  5. Filter
  6. Function2
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpResponseFilter()

    Permalink
  2. new HttpResponseFilter(fullyQualifyLocationHeader: Boolean)

    Permalink

    fullyQualifyLocationHeader

    the Filter should attempt to always fully qualify the value of the response 'Location' header. Default: false

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def agnosticAndThen(next: TypeAgnostic): Filter[R, Response, R, Response]

    Permalink
    Definition Classes
    Filter
  5. def andThen(factory: ServiceFactory[R, Response]): ServiceFactory[R, Response]

    Permalink
    Definition Classes
    Filter
  6. def andThen(service: Service[R, Response]): Service[R, Response]

    Permalink
    Definition Classes
    Filter
  7. def andThen[Req2, Rep2](next: Filter[R, Response, Req2, Rep2]): Filter[R, Response, Req2, Rep2]

    Permalink
    Definition Classes
    Filter
  8. def andThenIf[Req2 >: R, Rep2 <: Response](condAndFilter: (Boolean, Filter[R, Response, Req2, Rep2])): Filter[R, Response, Req2, Rep2]

    Permalink
    Definition Classes
    Filter
  9. def apply(request: R, service: Service[R, Response]): Future[Response]

    Permalink
    Definition Classes
    HttpResponseFilter → Filter → Function2
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def curried: (R) ⇒ (Service[R, Response]) ⇒ Future[Response]

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  13. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  14. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  15. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  16. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  17. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  18. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  22. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  23. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  30. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  31. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  32. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  33. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  34. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  35. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  36. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  38. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  39. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  41. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  43. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  45. final def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  46. final def loggerName: String

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  48. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  49. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  50. def setLocationHeader(headerMap: HeaderMap, value: String): Unit

    Permalink

    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).

    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
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  52. def time[T](formatStr: String)(func: ⇒ T): T

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  53. def toString(): String

    Permalink
    Definition Classes
    Filter → Function2 → AnyRef → Any
  54. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  58. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. def tupled: ((R, Service[R, Response])) ⇒ Future[Response]

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  60. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  64. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  65. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  66. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  67. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from Logging

Inherited from Logging

Inherited from SimpleFilter[R, Response]

Inherited from Filter[R, Response, R, Response]

Inherited from (R, Service[R, Response]) ⇒ Future[Response]

Inherited from AnyRef

Inherited from Any

Ungrouped