Mercurial > hg > icedtea6-hg
view patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch @ 3267:8b26ecee3670
Update to build against July 2016 security fixes (b40).
Upstream changes:
- S4893408: JPEGReader throws IllegalArgException when setting the destination to BYTE_GRAY
- S6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux
- S6522789: [zh_CN] translation of "enclosing class" in doclet is incorrect
- S6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
- S6579775: l10n update after 6212566
- S6600143: Remove another 450 unnecessary casts
- S6611629: Avoid hardcoded cygwin paths for memory detection
- S6631559: Registration of ImageIO plugins should not cause loading of jpeg.dlli and cmm.dll
- S6690018: RSAClientKeyExchange NullPointerException
- S6714842: CertPathBuilder returns incorrect CertPath for BasicConstraints in builderParams
- S6726309: Compiler warnings in nio code
- S6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
- S6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
- S6752638: java.awt.GraphicsEnvironment.preferLocaleFonts() throws NPE on Linux
- S6755847: (launcher) will trigger assertions in debug build
- S6791502: IIOException "Invalid icc profile" on jpeg after update from JDK5 to JDK6
- S6793818: JpegImageReader is too greedy creating color profiles
- S6799141: Build with --hash-style=both so that binaries can work on SuSE 10
- S6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
- S6852744: PIT b61: PKI test suite fails because self signed certificates are being rejected
- S6864028: Update the java launcher to use the new entry point JVM_FindClassFromBootLoader
- S6875904: Java 7 message synchronization 1
- S6882437: CertPath/X509CertPathDiscovery/Test fails on jdk7/pit/b62
- S6888127: java.util.jar.Pack200.Packer Memory Leak
- S6888215: memory leak in jpeg plugin
- S6888925: SunMSCAPI's Cipher can't use RSA public keys obtained from other sources.
- S6889552: Sun provider should not require LDAP CertStore to be present
- S6941936: Broken pipe error of test case DNSIdentities.java
- S6951599: Rename package of security tools for modularization
- S6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package
- S6958026: Problem with PKCS12 keystore
- S6974017: Upgrade required Solaris Studio compilers to 5.10 (12 update 1 + patches)
- S6980281: SWAT: SwingSet2 got core dumped in Solaris-AMD64 using b107 swat build
- S6989774: imageio compiler warnings in native code
- S6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
- S6994413: JDK_GetVersionInfo0 only expects a two digit build number
- S7000225: Sanity check on sane-alsa-headers is broken
- S7000752: Duplicate entry in RowSetResourceBundles.properties
- S7001094: Can't initialize SunPKCS11 more times than PKCS11 driver maxSessionCount
- S7003227: (pack200) intermittent failures compiling pack200
- S7004706: l10n of 7000752 Duplicate entry in RowSetResourceBundles.properties
- S7006704: (pack200) add missing file for 6990106
- S7011497: Improve trust anchor searching method during cert path validation
- S7017734: jdk7 message drop 1 translation integration
- S7023416: (pack200) fix parfait issues
- S7029680: fix test/sun/misc/Version/Version.java build parsing
- S7038175: Expired PKITS certificates causing CertPathBuilder and CertPathValidator regression test failures
- S7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
- S7050826: Hebrew characters are not rendered on OEL 5.6
- S7055363: jdk_security3 test target cleanup
- S7060849: Eliminate pack200 build warnings
- S7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
- S7069870: Parts of the JDK erroneously rely on generic array initializers with diamond
- S7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing
- S7092825: javax.crypto.Cipher.Transform.patternCache is synchronizedMap and became scalability bottleneck.
- S7105780: Add SSLSocket client/SSLEngine server to templates directory
- S7107613: scalability blocker in javax.crypto.CryptoPermissions
- S7107616: scalability blocker in javax.crypto.JceSecurityManager
- S7109274: Restrict the use of certificates with RSA keys less than 1024 bits
- S7129083: CookieManager does not store cookies if url is read before setting cookie manager
- S7152582: PKCS11 tests should use the NSS libraries available in the OS
- S7166955: (pack200) JNI_GetCreatedJavaVMs needs additional checking
- S7196855: autotest.sh fails on ubuntu because libsoftokn.so not found
- S7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so
- S8002306: (se) Selector.open fails if invoked with thread interrupt status set [win]
- S8009634: TEST_BUG: sun/misc/Version/Version.java handle 2 digit minor in VM version
- S8010166: TEST_BUG: fix for 8009634 overlooks possible version strings (sun/misc/Version/Version.java)
- S8013228: Create new system properties to control allowable OCSP clock skew and CRL connection timeout
- S8019341: Update CookieHttpsClientTest to use the newer framework.
- S8022228: Intermittent test failures in sun/security/ssl/javax/net/ssl/NewAPIs
- S8022594: Potential deadlock in <clinit> of sun.nio.ch.Util/IOUtil
- S8023546: sun/security/mscapi/ShortRSAKey1024.sh fails intermittently
- S8026794: Test tools/pack200/TimeStamp.java fails while opening golden.jar.native.IST on linux-ppc(v2)
- S8027026: Change keytool -genkeypair to use -keyalg RSA
- S8029177: [Parfait] warnings from b117 for jdk.src.share.native.com.sun.java.util.jar: JNI exception pending
- S8029646: [pack200] should support the new zip64 format.
- S8036612: [parfait] JNI exception pending in jdk/src/windows/native/sun/security/mscapi/security.cpp
- S8037557: test SessionCacheSizeTests.java timeout
- S8074839: Resolve disabled warnings for libunpack and the unpack200 binary
- S8079410: Hotspot version to share the same update and build version from JDK
- S8079718: IIOP Input Stream Hooking
- S8130735: javax.swing.TimerQueue: timer fires late when another timer starts
- S8139436: sun.security.mscapi.KeyStore might load incomplete data
- S8140344: add support for 3 digit update release numbers
- S8144313: Test SessionTimeOutTests can be timeout
- S8145017: Add support for 3 digit hotspot minor version numbers
- S8145446: Perfect pipe placement
- S8146387: Test SSLSession/SessionCacheSizeTests socket accept timed out
- S8146669: Test SessionTimeOutTests fails intermittently
- S8146993: Several javax/management/remote/mandatory regression tests fail after JDK-8138811
- S8147771: Construction of static protection domains under Javax custom policy
- S8147857: [TEST] RMIConnector logs attribute names incorrectly
- S8148872: Complete name checking
- S8149962: Better delineation of XML processing
- S8150752: Share Class Data
- S8151841: Build needs additional flags to compile with GCC 6
- S8151876: (tz) Support tzdata2016d
- S8151925: Font reference improvements
- S8152479: Coded byte streams
- S8155981: Bolster bytecode verification
- S8161262: Fix jdk build with gcc 4.1.2: -fno-strict-overflow not known.
- S8162344: The API changes made by CR 7064075 need to be reverted
- S8162818: Sync src/share/native/com/sun/media code with OpenJDK 7
- S8162828: Sync imageioJPEG.c with initial OpenJDK 7 version
- S8163022: Remove @Override annotation on interfaces added by 2016/04 security fixes
- S8164181: Remove @Override annotation on interfaces added by 2016/07 security fixes
ChangeLog:
2016-08-16 Andrew John Hughes <gnu.andrew@redhat.com>
* patches/imageiojpeg_sync.patch,
* patches/openjdk/4893408-jpegreader_byte_gray.patch,
* patches/openjdk/6563752-ss12_support.patch,
* patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch,
* patches/openjdk/6729772-opt_cleanup.patch,
* patches/openjdk/6791502-invalid_icc_profile.patch,
* patches/openjdk/6793818-jpegimagereader_too_greedy.patch,
* patches/openjdk/6799141-split_out_versions.patch,
* patches/openjdk/6816311-compiler_name.patch,
* patches/openjdk/6888215-jpeg_memory_leak.patch,
* patches/openjdk/6974017-minorver_for_solaris.patch,
* patches/openjdk/6980281-majorver_for_solaris.patch,
* patches/openjdk/6989774-imageio_compiler_warnings.patch,
* patches/openjdk/7000225-bad_tabs.patch,
* patches/openjdk/7038711-fix_no-clobber_usage.patch,
* patches/parisc.patch:
Removed as applied upstream.
* Makefile.am:
(ICEDTEA_PATCHES): Remove deleted patches.
* NEWS: Updated with b40 changes. Correct
1.13.11 release notes to mention b39, not b38.
* patches/arch.patch:
Drop hunk in jdk/make/common/shared/Compiler-gcc.gmk
as compiler versions are no longer specified by
architecture on GNU/Linux, following 6799141.
* patches/ecj/override.patch:
Remove sections included in upstream 8163022.
* patches/linker-libs-order.patch:
Drop ALSA chunk in make/common/shared/Sanity.gmk
as version is now obtained from header file
following 6799141.
* patches/openjdk/7025066-embedded_build.patch:
Regenerated.
* patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch:
Remove cast from context as it no longer exists
following 6600143.
author | Andrew John Hughes <gnu.andrew@redhat.com> |
---|---|
date | Wed, 17 Aug 2016 02:53:46 +0100 |
parents | 8abbd8ec5d4c |
children |
line wrap: on
line source
diff -r c4ed64237075 src/share/classes/sun/net/www/http/HttpClient.java --- openjdk/jdk/src/share/classes/sun/net/www/http/HttpClient.java Wed Apr 01 00:13:50 2015 +0100 +++ openjdk/jdk/src/share/classes/sun/net/www/http/HttpClient.java Thu Apr 02 18:21:08 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -251,16 +251,17 @@ */ public static HttpClient New(URL url) throws IOException { - return HttpClient.New(url, Proxy.NO_PROXY, -1, true); + return HttpClient.New(url, Proxy.NO_PROXY, -1, true, null); } public static HttpClient New(URL url, boolean useCache) throws IOException { - return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache); + return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache, null); } - public static HttpClient New(URL url, Proxy p, int to, boolean useCache) - throws IOException { + public static HttpClient New(URL url, Proxy p, int to, boolean useCache, + HttpURLConnection httpuc) throws IOException + { if (p == null) { p = Proxy.NO_PROXY; } @@ -268,6 +269,12 @@ /* see if one's already around */ if (useCache) { ret = kac.get(url, null); + if (ret != null && httpuc != null && + httpuc.streaming() && + httpuc.getRequestMethod() == "POST") { + if (!ret.available()) + ret = null; + } if (ret != null) { if ((ret.proxy != null && ret.proxy.equals(p)) || (ret.proxy == null && p == null)) { @@ -306,20 +313,25 @@ return ret; } - public static HttpClient New(URL url, Proxy p, int to) throws IOException { - return New(url, p, to, true); + public static HttpClient New(URL url, Proxy p, int to, + HttpURLConnection httpuc) throws IOException + { + return New(url, p, to, true, httpuc); } public static HttpClient New(URL url, String proxyHost, int proxyPort, boolean useCache) throws IOException { - return New(url, newHttpProxy(proxyHost, proxyPort, "http"), -1, useCache); + return New(url, newHttpProxy(proxyHost, proxyPort, "http"), + -1, useCache, null); } public static HttpClient New(URL url, String proxyHost, int proxyPort, - boolean useCache, int to) + boolean useCache, int to, + HttpURLConnection httpuc) throws IOException { - return New(url, newHttpProxy(proxyHost, proxyPort, "http"), to, useCache); + return New(url, newHttpProxy(proxyHost, proxyPort, "http"), + to, useCache, httpuc); } /* return it to the cache as still usable, if: @@ -348,6 +360,33 @@ } } + protected synchronized boolean available() throws IOException { + boolean available = true; + int old = serverSocket.getSoTimeout(); + serverSocket.setSoTimeout(1); + BufferedInputStream tmpbuf = + new BufferedInputStream(serverSocket.getInputStream()); + + try { + int r = tmpbuf.read(); + if (r == -1) { + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("HttpClient.available(): " + + "read returned -1: not available"); + } + available = false; + } + } catch (SocketTimeoutException e) { + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("HttpClient.available(): " + + "SocketTimeout: its available"); + } + } finally { + serverSocket.setSoTimeout(old); + } + return available; + } + protected synchronized void putInKeepAliveCache() { if (inCache) { assert false : "Duplicate put to keep alive cache"; diff -r c4ed64237075 src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java --- openjdk/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Wed Apr 01 00:13:50 2015 +0100 +++ openjdk/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Apr 02 18:21:08 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -619,7 +619,7 @@ */ protected void setNewClient (URL url, boolean useCache) throws IOException { - http = HttpClient.New(url, null, -1, useCache, connectTimeout); + http = HttpClient.New(url, null, -1, useCache, connectTimeout, this); http.setReadTimeout(readTimeout); } @@ -660,7 +660,8 @@ String proxyHost, int proxyPort, boolean useCache) throws IOException { - http = HttpClient.New (url, proxyHost, proxyPort, useCache, connectTimeout); + http = HttpClient.New (url, proxyHost, proxyPort, useCache, + connectTimeout, this); http.setReadTimeout(readTimeout); } @@ -951,14 +952,14 @@ // subclass HttpsClient will overwrite & return an instance of HttpsClient protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout) throws IOException { - return HttpClient.New(url, p, connectTimeout); + return HttpClient.New(url, p, connectTimeout, this); } // subclass HttpsClient will overwrite & return an instance of HttpsClient protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout, boolean useCache) throws IOException { - return HttpClient.New(url, p, connectTimeout, useCache); + return HttpClient.New(url, p, connectTimeout, useCache, this); } private void expect100Continue() throws IOException { @@ -1095,7 +1096,7 @@ } } - private boolean streaming () { + public boolean streaming () { return (fixedContentLength != -1) || (chunkLength != -1); }