7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 6216082 27 * @library .. 28 * @build HttpCallback TestHttpsServer ClosedChannelList HttpTransaction TunnelProxy 29 * @summary Redirect problem with HttpsURLConnection using a proxy 30 * SunJSSE does not support dynamic system properties, no way to re-use 31 * system properties in samevm/agentvm mode. 32 * @run main/othervm B6216082 33 */ 34 35 import java.io.*; 36 import java.net.*; 37 import javax.net.ssl.*; 38 import java.util.*; 39 40 public class B6216082 { 41 static SimpleHttpTransaction httpTrans; 42 static TestHttpsServer server; 43 static TunnelProxy proxy; 44 45 // it seems there's no proxy ever if a url points to 'localhost', 46 // even if proxy related properties are set. so we need to bind 47 // our simple http proxy and http server to a non-loopback address 48 static InetAddress firstNonLoAddress = null; 49 50 public static void main(String[] args) throws Exception { 51 HostnameVerifier reservedHV = | 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 6216082 27 * @summary Redirect problem with HttpsURLConnection using a proxy 28 * SunJSSE does not support dynamic system properties, no way to re-use 29 * system properties in samevm/agentvm mode. 30 * @modules java.base/sun.net.www 31 * @library .. 32 * @build HttpCallback TestHttpsServer ClosedChannelList HttpTransaction TunnelProxy 33 * @run main/othervm B6216082 34 */ 35 36 import java.io.*; 37 import java.net.*; 38 import javax.net.ssl.*; 39 import java.util.*; 40 41 public class B6216082 { 42 static SimpleHttpTransaction httpTrans; 43 static TestHttpsServer server; 44 static TunnelProxy proxy; 45 46 // it seems there's no proxy ever if a url points to 'localhost', 47 // even if proxy related properties are set. so we need to bind 48 // our simple http proxy and http server to a non-loopback address 49 static InetAddress firstNonLoAddress = null; 50 51 public static void main(String[] args) throws Exception { 52 HostnameVerifier reservedHV = |