I have requested an account. I will compile all information from the mail exchanges and add an updated test class.
Bernhard -----Original Message----- From: Oleg Kalnichevski <ol...@apache.org> Sent: Tuesday, October 8, 2024 12:59 To: HttpClient User Discussion <httpclient-users@hc.apache.org> Subject: Re: Exception in version 5.4 with Java 8, potential bug On Tue, 2024-10-08 at 09:52 +0000, Bernhard Fey wrote: > It's Oracle Java SE 8. > Our customers will expect us to support that as long as the minimum > requirement of our product is Java 8. > We also implicitly thought that "HttpClient 5.4 requires Java 1.8 or > newer" means that Oracle JREs of that version are supported. > If this is not the case, we will have to delay updating to version > 5.4 until we'll have removed support for Java 8 from our product. > > Bernhard Hi Bernhard Feel free to raise a change request in JIRA for this issue. I will try to get the latest Oracle JDK and run a few tests with it. It is possible UnsupportedOperationException can be just caught and ignored but I want to make sure there are no surprises. Cheers Oleg > > > -----Original Message----- > From: Oleg Kalnichevski <ol...@apache.org> > Sent: Tuesday, October 8, 2024 11:08 > To: HttpClient User Discussion <httpclient-users@hc.apache.org>; > Bernhard Fey <bernhard....@realobjects.com> > Subject: Re: Exception in version 5.4 with Java 8, potential bug > > > > On 08/10/2024 10:44, Bernhard Fey wrote: > > We have reproduced the issue on Oracle Java SE 8, in my case "Oracle > > Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_411- b09". > > We have not tried OpenJDK. Sorry for missing this detail in my > > initial mail. > > > > Bernhard > > > > > > Bernhard > > HttpClient expects the TLS half-close policy to be supported by the > JRE for some of its features such as out of sequence response > detection to work correctly. > > If we blindly ignore UnsupportedOperationException here things may > still break elsewhere. > > Is there any particular reason for using a JRE with an incomplete TLS > support? > > Oleg > > PS: please make sure you are subscribed to the list to receive > response messages. > > > > -----Original Message----- > > From: Oleg Kalnichevski <ol...@apache.org> > > Sent: Tuesday, October 8, 2024 10:31 > > To: HttpClient User Discussion <httpclient-users@hc.apache.org> > > Subject: Re: Exception in version 5.4 with Java 8, potential bug > > > > On Tue, 2024-10-08 at 08:09 +0000, Bernhard Fey wrote: > > > Hello, I hope this is the right place to report potential bugs. > > > > > > When updating to version 5.4 our Java 8 tests fail with the > > > following > > > exception: > > > > > > java.lang.UnsupportedOperationException: method is not supported > > > because of the TLS half-close policy > > > at > > > sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:7 > > > 65) > > > at > > > sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:7 > > > 43) > > > at > > > org.apache.hc.core5.http.impl.io.BHttpConnectionBase.close(BHttpC > > > onne > > > ctionBase.java:255) > > > at > > > org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection.clo > > > se(D > > > efaultBHttpClientConnection.java:71) > > > at > > > org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnec > > > tion > > > .close(DefaultManagedHttpClientConnection.java:176) > > > at > > > org.apache.hc.core5.pool.PoolEntry.discardConnection(PoolEntry.ja > > > va:1 > > > 80) > > > at > > > org.apache.hc.core5.pool.StrictConnPool$PerRoutePool.shutdown(Str > > > ictC > > > onnPool.java:839) > > > at > > > org.apache.hc.core5.pool.StrictConnPool.close(StrictConnPool.java > > > :142 > > > ) > > > at > > > org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionMan > > > ager > > > .close(PoolingHttpClientConnectionManager.java:277) > > > at > > > org.apache.hc.client5.http.impl.classic.InternalHttpClient.close( > > > Inte > > > rnalHttpClient.java:198) > > > at > > > org.apache.hc.client5.http.impl.classic.InternalHttpClient.close( > > > Inte > > > rnalHttpClient.java:188) > > > at J8HttpsErrorTest.main(J8HttpsErrorTest.java:21) > > > > > > It seems to be a bug, but please let me know if it is a mistake on > > > our side. > > > > > > I have put together the following test class, which fails in Java > > > 8 > > > with the above exception, but finishes correctly with Java 11 > > > (tested on Windows 10, but the Java 8 exception also occurs on > > > Linux in our > > > integration): > > > > > > > ``` > > Amazon.com Inc. OpenJDK 64-Bit Server VM 25.342-b07 Sucessfully > > loaded: <!doctype html><html itemscope="" > > itemtype="https://eur03.safelinks.protection.outlook.com/?url=http%3 > > A%2F%2Fschema.org%2FWebPage&data=05%7C02%7Cbernhard.fey%40realobject > > s.com%7C676d0beb614343acb1a208dce788732f%7C4b18f3488d1a44688aa9824af > > 9ab3105%7C0%7C0%7C638639820451389920%7CUnknown%7CTWFpbGZsb3d8eyJWIjo > > iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7 > > C%7C&sdata=qgu3AkkButGrvy4es4FmMuCyjtCyYiX8Z34JzvAenlA%3D&reserved=0 > > " lang="de-CH"><head><meta content="text/html; charset=UTF-8" > > http-equiv="Content-Type"><meta > > content="/images/branding/googleg/1x/googleg_standard_color_128dp.p > > ng" > > itemprop="image"><title>Google</title><script > > nonce="sTJzMJQONf2G0BTpBOe_Tw">(function(){var _g={kEI:'9ewEZ_e- > > I4vShbIPnNiauAk',kEXPI:'0,3700316,633,435,447881,648,90132,2872,289 > > 1,43 > > 028,30022,16105,203622,6700,126319,8155,23350,22436,9779,12414,5024 > > 3,76 > > 209,15816,1804,21012,26070,1632,13496,15783,12989,8789,5208515,9465 > > ,102 > > 3,5991408,2841102,880,1,38,6,29,2,69,14,3,8,1,3,9,68,4,11,3,7440095 > > ,205 > > 39789,1007,15665,43887,3,1603,3,2124363,230293 > > > > > > > <<< > > ``` > > > > The test case passes for me in my local environment. > > > > I used this JRE to test > > > > ``` > > openjdk version "1.8.0_342" > > OpenJDK Runtime Environment Corretto-8.342.07.4 (build 1.8.0_342- > > b07) OpenJDK 64-Bit Server VM Corretto-8.342.07.4 (build 25.342- > > b07, mixed > > mode) > > ``` > > > > Oleg > > > > > > ------------------------------------------------------------------- > > -- > > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > > For additional commands, e-mail: > > httpclient-users-h...@hc.apache.org > > > > > > ------------------------------------------------------------------- > > -- > > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > > For additional commands, e-mail: > > httpclient-users-h...@hc.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org