package org.littleshoot.proxy;

import io.netty.handler.codec.http.HttpRequest;

/**
 * <p>
 * Additional filters on top of {@link org.littleshoot.proxy.HttpFilters}
 * </p>
 */
public interface HttpFilters2 extends HttpFilters {
    /**
     *
     *
     * @param httpRequest
     * @return
     */
    String parseHostAndPort(final HttpRequest httpRequest);

    /**
     * Return false to allow the normal LittleProxy processing which
     * checks for Proxy-Authorization. Return true to skip this processing.
     * If you're not sure what to return, just return false.
     *
     * @param request Incoming request.
     * @return False to allow LittleProxy to process Proxy-Authorization,
     * true to skip that processing.
     */
    boolean skipProxyAuthorizationProcessing(final HttpRequest request);
}

@@ -241,56 +241,564 @@
    *
-%0A     *%0A     * @param httpRequest%0A     * @return
+ By default, LittleProxy parses the host and port to proxy%0A     * back to by looking at%0A     * %7B@link io.netty.handler.codec.http.HttpRequest#getUri()%7D.%0A     * Override this method to parse the host and port in a different way.%0A     * Return null to process normally. If you're not sure what to return,%0A     * return null.%0A     *%0A     * @param httpRequest Incoming request.%0A     * @return Null to defer to LittleProxy's default host and port%0A     * parsing; otherwise, return the host and port in the form%0A     * host:port (wihout a scheme or any slashes).
 %0A   

Update comment on parseHostAndPort