Class HttpsHostCaptureFilter

  • All Implemented Interfaces:
    org.littleshoot.proxy.HttpFilters
    Direct Known Subclasses:
    HttpsOriginalHostCaptureFilter

    public class HttpsHostCaptureFilter
    extends org.littleshoot.proxy.HttpFiltersAdapter
    Captures the host for HTTPS requests and stores the value in the ChannelHandlerContext for use by HttpsAwareFiltersAdapter filters. This filter reads the host from the HttpRequest during the HTTP CONNECT call, and therefore MUST be invoked after any other filters which modify the host. Note: If the request uses the default HTTPS port (443), it will be removed from the hostname captured by this filter.
    • Field Summary

      • Fields inherited from class org.littleshoot.proxy.HttpFiltersAdapter

        ctx, NOOP_FILTER, originalRequest
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpsHostCaptureFilter​(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.netty.handler.codec.http.HttpResponse clientToProxyRequest​(io.netty.handler.codec.http.HttpObject httpObject)  
      • Methods inherited from class org.littleshoot.proxy.HttpFiltersAdapter

        proxyToClientResponse, proxyToServerConnectionFailed, proxyToServerConnectionQueued, proxyToServerConnectionSSLHandshakeStarted, proxyToServerConnectionStarted, proxyToServerConnectionSucceeded, proxyToServerRequest, proxyToServerRequestSending, proxyToServerRequestSent, proxyToServerResolutionFailed, proxyToServerResolutionStarted, proxyToServerResolutionSucceeded, serverToProxyResponse, serverToProxyResponseReceived, serverToProxyResponseReceiving, serverToProxyResponseTimedOut
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpsHostCaptureFilter

        public HttpsHostCaptureFilter​(io.netty.handler.codec.http.HttpRequest originalRequest,
                                      io.netty.channel.ChannelHandlerContext ctx)
    • Method Detail

      • clientToProxyRequest

        public io.netty.handler.codec.http.HttpResponse clientToProxyRequest​(io.netty.handler.codec.http.HttpObject httpObject)
        Specified by:
        clientToProxyRequest in interface org.littleshoot.proxy.HttpFilters
        Overrides:
        clientToProxyRequest in class org.littleshoot.proxy.HttpFiltersAdapter