aws-sdk-java icon indicating copy to clipboard operation
aws-sdk-java copied to clipboard

The ClientConfiguration get proxy setting with protocol type other than proxy protocol type

Open HelloHorizon opened this issue 4 years ago • 1 comments

Describe the bug

The ClientConfiguration gets the client configuration from the system based on the protocol type other than proxy protocol type. If the user sets the protocol with HTTPS and proxy protocol with HTTP, the client will set the proxy with system property https.proxyHost.

Expected Behavior

ClientConfiguration sets the client configuration from the system based on the protocol type as: protocol check

Current Behavior

ClientConfiguration sets the client configuration from the system based on the proxy type.

Steps to Reproduce

Possible Solution

Change the check logic as follows:

   private String getProxyHostProperty() {
        return getProxyProtocol() == Protocol.HTTPS
                ? getSystemProperty("https.proxyHost")
                : getSystemProperty("http.proxyHost");
    }

Context

Your Environment

  • AWS Java SDK version used: 1.11.815
  • JDK version used: 1.8
  • Operating System and version: mac

HelloHorizon avatar May 10 '21 04:05 HelloHorizon

@HelloHorizon thank you for reporting this, marking as a bug.

debora-ito avatar May 11 '21 18:05 debora-ito