Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6316D200B52 for ; Mon, 25 Jul 2016 13:28:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61A6B160A7D; Mon, 25 Jul 2016 11:28:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AC9BF160A78 for ; Mon, 25 Jul 2016 13:28:19 +0200 (CEST) Received: (qmail 33035 invoked by uid 500); 25 Jul 2016 11:28:18 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 33024 invoked by uid 99); 25 Jul 2016 11:28:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2016 11:28:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7BD37E00A7; Mon, 25 Jul 2016 11:28:18 +0000 (UTC) From: simonetripodi To: dev@hc.apache.org Reply-To: dev@hc.apache.org References: In-Reply-To: Subject: [GitHub] httpclient pull request #56: HTTPCLIENT-1752 - Allow to configure the OSGI c... Content-Type: text/plain Message-Id: <20160725112818.7BD37E00A7@git1-us-west.apache.org> Date: Mon, 25 Jul 2016 11:28:18 +0000 (UTC) archived-at: Mon, 25 Jul 2016 11:28:20 -0000 Github user simonetripodi commented on a diff in the pull request: https://github.com/apache/httpclient/pull/56#discussion_r72047827 --- Diff: httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/RelaxedLayeredConnectionSocketFactory.java --- @@ -0,0 +1,101 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ +package org.apache.hc.client5.http.osgi.impl; + +import static org.apache.hc.client5.http.osgi.impl.HostMatcher.HostMatcherFactory.createMatcher; +import static org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.getSocketFactory; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.Socket; + +import org.apache.hc.client5.http.osgi.services.TrustedHostsConfiguration; +import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.protocol.HttpContext; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; + +final class RelaxedLayeredConnectionSocketFactory implements LayeredConnectionSocketFactory { + + private final SSLConnectionSocketFactory defaultSocketFactory = getSocketFactory(); --- End diff -- Thanks for the hint, I am going to add this behaviour! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org