From dev-return-19050-archive-asf-public=cust-asf.ponee.io@manifoldcf.apache.org Thu Jan 17 17:32:09 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 15C2A18063F for ; Thu, 17 Jan 2019 17:32:07 +0100 (CET) Received: (qmail 30132 invoked by uid 500); 17 Jan 2019 16:32:07 -0000 Mailing-List: contact dev-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list dev@manifoldcf.apache.org Received: (qmail 30120 invoked by uid 99); 17 Jan 2019 16:32:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2019 16:32:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A2458C8126 for ; Thu, 17 Jan 2019 16:32:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id nlkPwrYtDYeJ for ; Thu, 17 Jan 2019 16:32:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C20DE60EEB for ; Thu, 17 Jan 2019 16:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DC263E2684 for ; Thu, 17 Jan 2019 16:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 52AC425651 for ; Thu, 17 Jan 2019 16:32:00 +0000 (UTC) Date: Thu, 17 Jan 2019 16:32:00 +0000 (UTC) From: "Michael Osipov (JIRA)" To: dev@manifoldcf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CONNECTORS-1564) Support preemptive authentication to Solr connector MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CONNECTORS-1564?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16745267#comment-16745267 ]=20 Michael Osipov commented on CONNECTORS-1564: -------------------------------------------- OK friends, here is minimal working example with HttpClient 4.5.6 against l= atest Apache Web Server: Anonymous endpoint: {code:java} import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import org.apache.http.HttpEntity; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; public class ExpectContinueTest { =09public static void main(String[] args) throws IOException { =09=09HttpClientBuilder builder =3D HttpClientBuilder.create(); =09=09RequestConfig rc =3D RequestConfig.custom().setExpectContinueEnabled(= true).build(); =09=09builder.setDefaultRequestConfig(rc); =09=09try (CloseableHttpClient httpClient =3D builder.build(); =09=09=09=09InputStream is =3D Files.newInputStream(Paths.get("D:", "metada= ta.dmp"))) { =09=09=09HttpPost method =3D new HttpPost( =09=09=09=09=09"https://blnn719x.ad001.siemens.net/~osipovmi/CONNECTORS-156= 4.php"); =09=09=09HttpEntity entity =3D new InputStreamEntity(is); =09=09=09method.setEntity(entity); =09=09=09CloseableHttpResponse response =3D httpClient.execute(method); =09=09=09EntityUtils.consumeQuietly(response.getEntity()); =09=09=09response.close(); =09=09} =09} } {code} Log ouput: {noformat} 655 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - Cookie= Spec selected: default 665 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth ca= che not set in the context 666 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection request: [route: {s}->https://blnn719x.ad001.siemens.net:44= 3][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20] 683 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection leased: [id: 0][route: {s}->https://blnn719x.ad001.siemens.= net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 o= f 20] 684 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening co= nnection {s}->https://blnn719x.ad001.siemens.net:443 695 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 695 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Conn= ecting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout 0 754 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led protocols: [TLSv1, TLSv1.1, TLSv1.2] 754 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_W= ITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WIT= H_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WIT= H_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_= WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_= 256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256= _CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SH= A, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_= SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SH= A256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SH= A256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC= _SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS= _ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DH= E_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECD= SA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_EC= DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_= ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DH= E_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECD= HE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_E= CDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE= _RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPT= Y_RENEGOTIATION_INFO_SCSV] 754 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Star= ting handshake 938 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secu= re session established 939 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated protocol: TLSv1.2 939 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 939 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemens= , C=3DDE 939 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r alternative names: [blnn719x.ad001.siemens.net] 939 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - iss= uer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens T= rust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBayer= n, C=3DDE 942 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connection established 147.54.65.49:56942<->147.54.64.19:443 942 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing = request POST /~osipovmi/CONNECTORS-1564.php HTTP/1.1 942 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target aut= h state: UNCHALLENGED 943 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth= state: UNCHALLENGED 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipov= mi/CONNECTORS-1564.php HTTP/1.1 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enco= ding: chunked 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn719= x.ad001.siemens.net 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: K= eep-Alive 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: A= pache-HttpClient/4.5.6 (Java/1.8.0_181) 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-c= ontinue 944 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encodi= ng: gzip,deflate 951 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 100 = Continue 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200= OK 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 1= 7 Jan 2019 16:09:43 GMT 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apac= he/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6= .1 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Opti= ons: SAMEORIGIN 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Powered-By= : PHP/7.2.13 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Leng= th: 0 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Keep-Alive: = timeout=3D300, max=3D1000 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: = Keep-Alive 1112 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type= : text/html; charset=3DUTF-8 1117 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connectio= n can be kept alive for 300000 MILLISECONDS 1118 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection [id: 0][route: {s}->https://blnn719x.ad001.siemens.net:443= ] can be kept alive for 300.0 seconds 1118 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: set socket timeout to 0 1118 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection released: [id: 0][route: {s}->https://blnn719x.ad001.sieme= ns.net:443][total kept alive: 1; route allocated: 1 of 2; total allocated: = 1 of 20] 1121 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager is shutting down 1121 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: Close connection 1122 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager shut down {noformat} Basic endpoint: {code:java} import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import org.apache.http.HttpEntity; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; public class ExpectContinueTest { =09public static void main(String[] args) throws IOException { =09=09HttpClientBuilder builder =3D HttpClientBuilder.create(); =09=09RequestConfig rc =3D RequestConfig.custom().setExpectContinueEnabled(= true).build(); =09=09builder.setDefaultRequestConfig(rc); =09=09try (CloseableHttpClient httpClient =3D builder.build(); =09=09=09=09InputStream is =3D Files.newInputStream(Paths.get("D:", "metada= ta.dmp"))) { =09=09=09HttpPost method =3D new HttpPost( =09=09=09=09=09"https://blnn719x.ad001.siemens.net/~osipovmi/basic/CONNECTO= RS-1564.php"); =09=09=09HttpEntity entity =3D new InputStreamEntity(is); =09=09=09method.setEntity(entity); =09=09=09CloseableHttpResponse response =3D httpClient.execute(method); =09=09=09EntityUtils.consumeQuietly(response.getEntity()); =09=09=09response.close(); =09=09} =09} } {code} No credentials provided: {noformat} 679 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - Cookie= Spec selected: default 695 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth ca= che not set in the context 696 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection request: [route: {s}->https://blnn719x.ad001.siemens.net:44= 3][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20] 712 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection leased: [id: 0][route: {s}->https://blnn719x.ad001.siemens.= net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 o= f 20] 714 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening co= nnection {s}->https://blnn719x.ad001.siemens.net:443 726 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 726 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Conn= ecting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout 0 785 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led protocols: [TLSv1, TLSv1.1, TLSv1.2] 785 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_W= ITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WIT= H_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WIT= H_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_= WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_= 256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256= _CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SH= A, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_= SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SH= A256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SH= A256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC= _SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS= _ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DH= E_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECD= SA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_EC= DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_= ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DH= E_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECD= HE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_E= CDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE= _RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPT= Y_RENEGOTIATION_INFO_SCSV] 785 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Star= ting handshake 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secu= re session established 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated protocol: TLSv1.2 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemens= , C=3DDE 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r alternative names: [blnn719x.ad001.siemens.net] 956 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - iss= uer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens T= rust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBayer= n, C=3DDE 960 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connection established 147.54.65.49:57003<->147.54.64.19:443 960 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing = request POST /~osipovmi/basic/CONNECTORS-1564.php HTTP/1.1 960 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target aut= h state: UNCHALLENGED 960 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth= state: UNCHALLENGED 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipov= mi/basic/CONNECTORS-1564.php HTTP/1.1 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enco= ding: chunked 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn719= x.ad001.siemens.net 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: K= eep-Alive 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: A= pache-HttpClient/4.5.6 (Java/1.8.0_181) 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-c= ontinue 961 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encodi= ng: gzip,deflate 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 401 = Unauthorized 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 17= Jan 2019 16:13:47 GMT 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apach= e/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6.= 1 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Optio= ns: SAMEORIGIN 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << WWW-Authentic= ate: Basic realm=3D"CONNECTORS-1564 Realm" 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Lengt= h: 533 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: c= lose 970 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type:= text/html; charset=3Diso-8859-1 972 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticati= on required 972 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - blnn719x.ad0= 01.siemens.net:443 requested authentication 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Authentication schemes in the order of preference: [Negotiate, Kerberos, N= TLM, CredSSP, Digest, Basic] 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Negotiate authentication scheme not available 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Kerberos authentication scheme not available 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for NTLM authentication scheme not available 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for CredSSP authentication scheme not available 972 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Digest authentication scheme not available 980 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnecti= on - http-outgoing-0: Close connection 981 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection= discarded 981 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection released: [id: 0][route: {s}->https://blnn719x.ad001.siemen= s.net:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0= of 20] 981 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection manager is shutting down 982 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection manager shut down {noformat} Invalid credentials provided: {code:java} import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import org.apache.http.HttpEntity; import org.apache.http.auth.AuthScope; import org.apache.http.auth.Credentials; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; public class ExpectContinueTest { =09public static void main(String[] args) throws IOException { =09=09CredentialsProvider cp =3D new BasicCredentialsProvider(); =09=09Credentials c =3D new UsernamePasswordCredentials("expect", "magic"); =09=09cp.setCredentials(AuthScope.ANY, c); =09=09HttpClientBuilder builder =3D HttpClientBuilder.create(); =09=09RequestConfig rc =3D RequestConfig.custom().setExpectContinueEnabled(= true).build(); =09=09builder.setDefaultRequestConfig(rc); =09=09builder.setDefaultCredentialsProvider(cp); =09=09try (CloseableHttpClient httpClient =3D builder.build(); =09=09=09=09InputStream is =3D Files.newInputStream(Paths.get("D:", "metada= ta.dmp"))) { =09=09=09HttpPost method =3D new HttpPost( =09=09=09=09=09"https://blnn719x.ad001.siemens.net/~osipovmi/basic/CONNECTO= RS-1564.php"); =09=09=09HttpEntity entity =3D new InputStreamEntity(is); =09=09=09method.setEntity(entity); =09=09=09CloseableHttpResponse response =3D httpClient.execute(method); =09=09=09EntityUtils.consumeQuietly(response.getEntity()); =09=09=09response.close(); =09=09} =09} } {code} Failed authentication: {noformat} 696 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - Cookie= Spec selected: default 705 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth ca= che not set in the context 709 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection request: [route: {s}->https://blnn719x.ad001.siemens.net:44= 3][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20] 724 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection leased: [id: 0][route: {s}->https://blnn719x.ad001.siemens.= net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 o= f 20] 725 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening co= nnection {s}->https://blnn719x.ad001.siemens.net:443 735 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 736 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Conn= ecting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout 0 798 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led protocols: [TLSv1, TLSv1.1, TLSv1.2] 798 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_W= ITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WIT= H_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WIT= H_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_= WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_= 256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256= _CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SH= A, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_= SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SH= A256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SH= A256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC= _SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS= _ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DH= E_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECD= SA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_EC= DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_= ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DH= E_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECD= HE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_E= CDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE= _RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPT= Y_RENEGOTIATION_INFO_SCSV] 798 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Star= ting handshake 981 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secu= re session established 981 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated protocol: TLSv1.2 981 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 981 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemens= , C=3DDE 982 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r alternative names: [blnn719x.ad001.siemens.net] 982 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - iss= uer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens T= rust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBayer= n, C=3DDE 986 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connection established 147.54.65.49:57083<->147.54.64.19:443 986 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing = request POST /~osipovmi/basic/CONNECTORS-1564.php HTTP/1.1 986 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target aut= h state: UNCHALLENGED 987 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth= state: UNCHALLENGED 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipov= mi/basic/CONNECTORS-1564.php HTTP/1.1 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enco= ding: chunked 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn719= x.ad001.siemens.net 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: K= eep-Alive 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: A= pache-HttpClient/4.5.6 (Java/1.8.0_181) 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-c= ontinue 988 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encodi= ng: gzip,deflate 998 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 401 = Unauthorized 998 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 17= Jan 2019 16:18:17 GMT 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apach= e/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6.= 1 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Optio= ns: SAMEORIGIN 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << WWW-Authentic= ate: Basic realm=3D"CONNECTORS-1564 Realm" 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Lengt= h: 533 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: c= lose 999 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type:= text/html; charset=3Diso-8859-1 1000 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticat= ion required 1000 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - blnn719x.ad= 001.siemens.net:443 requested authentication 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Authentication schemes in the order of preference: [Negotiate, Kerberos, = NTLM, CredSSP, Digest, Basic] 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Challenge for Negotiate authentication scheme not available 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Challenge for Kerberos authentication scheme not available 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Challenge for NTLM authentication scheme not available 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Challenge for CredSSP authentication scheme not available 1001 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Challenge for Digest authentication scheme not available 1006 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Selected au= thentication options: [BASIC [complete=3Dtrue]] 1006 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: Close connection 1006 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening c= onnection {s}->https://blnn719x.ad001.siemens.net:443 1007 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOper= ator - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 1007 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Con= necting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout = 0 1010 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Ena= bled protocols: [TLSv1, TLSv1.1, TLSv1.2] 1010 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Ena= bled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_= WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WI= TH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WI= TH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA= _WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES= _256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_25= 6_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_S= HA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC= _SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_S= HA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_S= HA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CB= C_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TL= S_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_D= HE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_EC= DSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_E= CDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH= _ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_D= HE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_EC= DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_= ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DH= E_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMP= TY_RENEGOTIATION_INFO_SCSV] 1010 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Sta= rting handshake 1121 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Sec= ure session established 1121 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - ne= gotiated protocol: TLSv1.2 1122 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - ne= gotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 1122 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pe= er principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemen= s, C=3DDE 1122 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pe= er alternative names: [blnn719x.ad001.siemens.net] 1122 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - is= suer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens = Trust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBaye= rn, C=3DDE 1123 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOper= ator - Connection established 147.54.65.49:57084<->147.54.64.19:443 1123 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing= request POST /~osipovmi/basic/CONNECTORS-1564.php HTTP/1.1 1123 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target au= th state: CHALLENGED 1123 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Generating = response to an authentication challenge using basic scheme 1128 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy aut= h state: UNCHALLENGED 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipo= vmi/basic/CONNECTORS-1564.php HTTP/1.1 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enc= oding: chunked 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn71= 9x.ad001.siemens.net 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: = Keep-Alive 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: = Apache-HttpClient/4.5.6 (Java/1.8.0_181) 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-= continue 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encod= ing: gzip,deflate 1128 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Authorizatio= n: Basic ZXhwZWN0Om1hZ2lj 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 401= Unauthorized 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 1= 7 Jan 2019 16:18:17 GMT 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apac= he/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6= .1 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Opti= ons: SAMEORIGIN 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << WWW-Authenti= cate: Basic realm=3D"CONNECTORS-1564 Realm" 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Leng= th: 533 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: = close 1133 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type= : text/html; charset=3Diso-8859-1 1133 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticat= ion required 1133 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - blnn719x.ad= 001.siemens.net:443 requested authentication 1133 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authorizati= on challenge processed 1134 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticat= ion failed 1137 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: Close connection 1137 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connectio= n discarded 1138 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection released: [id: 0][route: {s}->https://blnn719x.ad001.sieme= ns.net:443][total kept alive: 0; route allocated: 0 of 2; total allocated: = 0 of 20] 1138 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager is shutting down 1138 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager shut down {noformat} Proper credentials: {code:java} import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import org.apache.http.HttpEntity; import org.apache.http.auth.AuthScope; import org.apache.http.auth.Credentials; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; public class ExpectContinueTest { =09public static void main(String[] args) throws IOException { =09=09CredentialsProvider cp =3D new BasicCredentialsProvider(); =09=09Credentials c =3D new UsernamePasswordCredentials("michaelo", "expect= -magic"); =09=09cp.setCredentials(AuthScope.ANY, c); =09=09HttpClientBuilder builder =3D HttpClientBuilder.create(); =09=09RequestConfig rc =3D RequestConfig.custom().setExpectContinueEnabled(= true).build(); =09=09builder.setDefaultRequestConfig(rc); =09=09builder.setDefaultCredentialsProvider(cp); =09=09try (CloseableHttpClient httpClient =3D builder.build(); =09=09=09=09InputStream is =3D Files.newInputStream(Paths.get("D:", "metada= ta.dmp"))) { =09=09=09HttpPost method =3D new HttpPost( =09=09=09=09=09"https://blnn719x.ad001.siemens.net/~osipovmi/basic/CONNECTO= RS-1564.php"); =09=09=09HttpEntity entity =3D new InputStreamEntity(is); =09=09=09method.setEntity(entity); =09=09=09CloseableHttpResponse response =3D httpClient.execute(method); =09=09=09EntityUtils.consumeQuietly(response.getEntity()); =09=09=09response.close(); =09=09} =09} } {code} Successful authentication: {noformat} 589 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - Cookie= Spec selected: default 598 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth ca= che not set in the context 601 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection request: [route: {s}->https://blnn719x.ad001.siemens.net:44= 3][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20] 613 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManag= er - Connection leased: [id: 0][route: {s}->https://blnn719x.ad001.siemens.= net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 o= f 20] 615 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening co= nnection {s}->https://blnn719x.ad001.siemens.net:443 627 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 627 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Conn= ecting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout 0 685 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led protocols: [TLSv1, TLSv1.1, TLSv1.2] 685 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_W= ITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WIT= H_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WIT= H_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_= WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_= 256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256= _CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SH= A, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_= SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SH= A256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SH= A256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC= _SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS= _ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DH= E_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECD= SA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_EC= DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_= ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DH= E_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECD= HE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_E= CDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE= _RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPT= Y_RENEGOTIATION_INFO_SCSV] 685 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Star= ting handshake 865 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secu= re session established 865 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated protocol: TLSv1.2 865 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 865 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemens= , C=3DDE 866 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r alternative names: [blnn719x.ad001.siemens.net] 866 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - iss= uer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens T= rust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBayer= n, C=3DDE 869 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connection established 147.54.65.49:57122<->147.54.64.19:443 869 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing = request POST /~osipovmi/basic/CONNECTORS-1564.php HTTP/1.1 869 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target aut= h state: UNCHALLENGED 869 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth= state: UNCHALLENGED 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipov= mi/basic/CONNECTORS-1564.php HTTP/1.1 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enco= ding: chunked 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn719= x.ad001.siemens.net 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: K= eep-Alive 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: A= pache-HttpClient/4.5.6 (Java/1.8.0_181) 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-c= ontinue 870 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encodi= ng: gzip,deflate 879 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 401 = Unauthorized 879 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 17= Jan 2019 16:20:17 GMT 879 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apach= e/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6.= 1 879 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Optio= ns: SAMEORIGIN 879 [main] DEBUG org.apache.http.headers - http-outgoing-0 << WWW-Authentic= ate: Basic realm=3D"CONNECTORS-1564 Realm" 880 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Lengt= h: 533 880 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: c= lose 880 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type:= text/html; charset=3Diso-8859-1 881 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticati= on required 881 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - blnn719x.ad0= 01.siemens.net:443 requested authentication 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Authentication schemes in the order of preference: [Negotiate, Kerberos, N= TLM, CredSSP, Digest, Basic] 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Negotiate authentication scheme not available 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Kerberos authentication scheme not available 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for NTLM authentication scheme not available 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for CredSSP authentication scheme not available 882 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy -= Challenge for Digest authentication scheme not available 886 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Selected aut= hentication options: [BASIC [complete=3Dtrue]] 886 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnecti= on - http-outgoing-0: Close connection 887 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening co= nnection {s}->https://blnn719x.ad001.siemens.net:443 887 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connecting to blnn719x.ad001.siemens.net/147.54.64.19:443 887 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Conn= ecting socket to blnn719x.ad001.siemens.net/147.54.64.19:443 with timeout 0 889 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led protocols: [TLSv1, TLSv1.1, TLSv1.2] 889 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Enab= led cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_W= ITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WIT= H_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WIT= H_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_= WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_= 256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256= _CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SH= A, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_= SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SH= A256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SH= A256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC= _SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS= _ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DH= E_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECD= SA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_EC= DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_= ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DH= E_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECD= HE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_E= CDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE= _RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPT= Y_RENEGOTIATION_INFO_SCSV] 889 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Star= ting handshake 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - Secu= re session established 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated protocol: TLSv1.2 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - neg= otiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r principal: CN=3Dblnn719x.ad001.siemens.net, OU=3DPD LD AP DW, O=3DSiemens= , C=3DDE 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - pee= r alternative names: [blnn719x.ad001.siemens.net] 997 [main] DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory - iss= uer principal: CN=3DSiemens Issuing CA Intranet Server 2017, OU=3DSiemens T= rust Center, SERIALNUMBER=3DZZZZZZB7, O=3DSiemens, L=3DMuenchen, ST=3DBayer= n, C=3DDE 997 [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOpera= tor - Connection established 147.54.65.49:57123<->147.54.64.19:443 997 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing = request POST /~osipovmi/basic/CONNECTORS-1564.php HTTP/1.1 997 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target aut= h state: CHALLENGED 998 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Generating r= esponse to an authentication challenge using basic scheme 1002 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy aut= h state: UNCHALLENGED 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> POST /~osipo= vmi/basic/CONNECTORS-1564.php HTTP/1.1 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Transfer-Enc= oding: chunked 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: blnn71= 9x.ad001.siemens.net 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: = Keep-Alive 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: = Apache-HttpClient/4.5.6 (Java/1.8.0_181) 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Expect: 100-= continue 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encod= ing: gzip,deflate 1002 [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Authorizatio= n: Basic bWljaGFlbG86ZXhwZWN0LW1hZ2lj 1007 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 100= Continue 1179 [main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 200= OK 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Thu, 1= 7 Jan 2019 16:20:17 GMT 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Apac= he/2.4.37 (FreeBSD) OpenSSL/1.0.2q PHP/7.2.13 SVN/1.9.9 mod_auth_gssapi/1.6= .1 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Frame-Opti= ons: SAMEORIGIN 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << X-Powered-By= : PHP/7.2.13 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Leng= th: 0 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Keep-Alive: = timeout=3D300, max=3D1000 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Connection: = Keep-Alive 1180 [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Type= : text/html; charset=3DUTF-8 1181 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connectio= n can be kept alive for 300000 MILLISECONDS 1181 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator - Authenticat= ion succeeded 1181 [main] DEBUG org.apache.http.impl.client.TargetAuthenticationStrategy = - Caching 'basic' auth scheme for https://blnn719x.ad001.siemens.net:443 1188 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection [id: 0][route: {s}->https://blnn719x.ad001.siemens.net:443= ] can be kept alive for 300.0 seconds 1188 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: set socket timeout to 0 1188 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection released: [id: 0][route: {s}->https://blnn719x.ad001.sieme= ns.net:443][total kept alive: 1; route allocated: 1 of 2; total allocated: = 1 of 20] 1191 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager is shutting down 1191 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnect= ion - http-outgoing-0: Close connection 1191 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionMana= ger - Connection manager shut down {noformat} PHP script: {code} $ less CONNECTORS-1564.php {code} I can repeat the same test with Tomcat, but the result won't change. If you happen to run Tomcat behind Apache Web Server as reverse proxy, the = expect *won't* work. You will suffer from https://bz.apache.org/bugzilla/sh= ow_bug.cgi?id=3D60330. If this is your case, please reach out to Jean-Fr=C3= =A9d=C3=A9ric and Yann. I need this backport too. > Support preemptive authentication to Solr connector > --------------------------------------------------- > > Key: CONNECTORS-1564 > URL: https://issues.apache.org/jira/browse/CONNECTORS-156= 4 > Project: ManifoldCF > Issue Type: Improvement > Components: Lucene/SOLR connector > Reporter: Erlend Gar=C3=A5sen > Assignee: Karl Wright > Priority: Major > Attachments: CONNECTORS-1564.patch > > > We should post preemptively in case the Solr server requires basic authen= tication. This will make the communication between ManifoldCF and Solr much= more effective instead of the following: > * Send a HTTP POST request to Solr > * Solr sends a 401 response > * Send the same request, but with a "{{Authorization: Basic}}" header > With preemptive authentication, we can send the header in the first reque= st. -- This message was sent by Atlassian JIRA (v7.6.3#76005)