Class ConfigAwareProxyServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class ConfigAwareProxyServlet
    extends org.mitre.dsmiley.httpproxy.ProxyServlet
    Extension of ProxyServlet that uses the current site configuration
    Since:
    3.1.7
    Author:
    joseross
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ATTR_TARGET_HOST  
      static String ATTR_TARGET_URI  
      • Fields inherited from class org.mitre.dsmiley.httpproxy.ProxyServlet

        asciiQueryChars, connectionRequestTimeout, connectTimeout, doForwardIP, doHandleCompression, doHandleRedirects, doLog, doPreserveCookies, doPreserveHost, doSendUrlFragment, hopByHopHeaders, maxConnections, P_CONNECTIONREQUESTTIMEOUT, P_CONNECTTIMEOUT, P_FORWARDEDFOR, P_HANDLECOMPRESSION, P_HANDLEREDIRECTS, P_LOG, P_MAXCONNECTIONS, P_PRESERVECOOKIES, P_PRESERVEHOST, P_READTIMEOUT, P_TARGET_URI, P_USESYSTEMPROPERTIES, readTimeout, targetHost, targetUri, targetUriObj, useSystemProperties
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void copyResponseHeaders​(org.apache.http.HttpResponse proxyResponse, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
      Override how ProxyServlet copy response headers.
      protected void initTarget()  
      protected org.apache.http.HttpRequest newProxyRequestWithEntity​(String method, String proxyRequestUri, javax.servlet.http.HttpServletRequest request)  
      • Methods inherited from class org.mitre.dsmiley.httpproxy.ProxyServlet

        buildHttpClient, buildProxyCookiePath, buildRequestConfig, buildSocketConfig, closeQuietly, copyProxyCookie, copyRequestHeader, copyRequestHeaders, copyResponseEntity, copyResponseHeader, createHttpClient, createProxyCookie, destroy, doExecute, encodeUriQuery, getConfigParam, getCookieNamePrefix, getHttpClientBuilder, getProxyClient, getProxyCookieName, getRealCookie, getServletInfo, getTargetHost, getTargetUri, getTargetUri, handleRequestException, init, rewritePathInfoFromRequest, rewriteQueryStringFromRequest, rewriteUrlFromRequest, rewriteUrlFromResponse, service
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
    • Field Detail

      • ATTR_TARGET_URI

        public static final String ATTR_TARGET_URI
      • ATTR_TARGET_HOST

        public static final String ATTR_TARGET_HOST
    • Constructor Detail

      • ConfigAwareProxyServlet

        public ConfigAwareProxyServlet()
    • Method Detail

      • initTarget

        protected void initTarget()
        Overrides:
        initTarget in class org.mitre.dsmiley.httpproxy.ProxyServlet
      • newProxyRequestWithEntity

        protected org.apache.http.HttpRequest newProxyRequestWithEntity​(String method,
                                                                        String proxyRequestUri,
                                                                        javax.servlet.http.HttpServletRequest request)
                                                                 throws IOException
        Overrides:
        newProxyRequestWithEntity in class org.mitre.dsmiley.httpproxy.ProxyServlet
        Throws:
        IOException
      • copyResponseHeaders

        protected void copyResponseHeaders​(org.apache.http.HttpResponse proxyResponse,
                                           javax.servlet.http.HttpServletRequest servletRequest,
                                           javax.servlet.http.HttpServletResponse servletResponse)
        Override how ProxyServlet copy response headers. If a header is added via HttpProxyFilter, do not add it again
        Overrides:
        copyResponseHeaders in class org.mitre.dsmiley.httpproxy.ProxyServlet
        Parameters:
        proxyResponse -
        servletRequest -
        servletResponse -