Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8016

HTTPS request and HTTP proxy with authorization

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      We encoutered same issue as CXF-2223 and [ENTESB-3892|https://issues.jboss.org/browse/ENTESB-3892]. CXF cannot use HTTP proxy with authentification when using HTTPS. HTTP communication is working without any problem.

       

      Proxy authorization is by a set following way:

      conduit.getProxyAuthorization().setUserName("xxx");
      conduit.getProxyAuthorization().setPassword("yyy");
      

       

      Following exception is thrown anyway

      Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
      at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2142)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259)
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:274)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1345)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1306)
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:307)
      at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
      at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1358)
      ... 56 common frames omitted
      

       

      I understand that this issue is long present problem but is there any update?

        Attachments

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              horca23 Michal Horcicko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: