Skip to content

NettyAsyncHttpProvider does not work work with -Dhttp.nonProxyHosts #202

@martinei

Description

@martinei

If a Proxy and an exception are vonfigured via http.proxyHost and http.nonProxyHost, the NettyAsyncHttpProvider will use the complete URL as Path (Which usually leads to a 404).

An Request that was meant to be issued against http://localhost:8080/ will look like this:

GET http://localhost:8080/ HTTP/1.1
Host: localhost:8080
...

The Problem is in NettyAsyncHttpProvider, line 572 and following:

if (isProxyServer(config, request))
                path = new StringBuilder(uri.toString());
            else {
                path = new StringBuilder(uri.getRawPath());
                if (uri.getQuery() != null) {
                    path.append("?").append(uri.getRawQuery());
                }
            }

isProxyServer returns true, even if the host is configured in nonProxyHost. It should better check ProxyUtils.avoidProxy(proxyServer, request);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions