HttpServer2.QuotingInputFilter (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.http, class: HttpServer2, class: QuotingInputFilter

Package org.apache.hadoop.http

# Class HttpServer2.QuotingInputFilter

java.lang.Object
org.apache.hadoop.http.HttpServer2.QuotingInputFilter

All Implemented Interfaces:
  `javax.servlet.Filter`

Enclosing class:
  HttpServer2

public static class HttpServer2.QuotingInputFilter extends Object implements javax.servlet.Filter
A Servlet input filter that quotes all HTML active characters in the parameter names and values. The goal is to quote the characters to make all of the servlets resistant to cross-site scripting attacks. It also sets X-FRAME-OPTIONS in the header to mitigate clickjacking attacks.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `HttpServer2.QuotingInputFilter.RequestQuoter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QuotingInputFilter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  `void`
  `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
  `void`
  `init(javax.servlet.FilterConfig config)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### QuotingInputFilter

    public QuotingInputFilter()

- ## Method Details

  - ### init

    public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
    Specified by:
      `init` in interface `javax.servlet.Filter`
    Throws:
      `javax.servlet.ServletException`

  - ### destroy

    public void destroy()
    Specified by:
      `destroy` in interface `javax.servlet.Filter`

  - ### doFilter

    public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
    Specified by:
      `doFilter` in interface `javax.servlet.Filter`
    Throws:
      `IOException`
      `javax.servlet.ServletException`