summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx9
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx9
2 files changed, 18 insertions, 0 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 6757694bf6c5..a8b1c8643c59 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -60,6 +60,7 @@
#include <ucbhelper/std_inputstream.hxx>
#include <ucbhelper/std_outputstream.hxx>
#include <ucbhelper/propertyvalueset.hxx>
+#include <ucbhelper/proxydecider.hxx>
#include "auth_provider.hxx"
#include "cmis_content.hxx"
@@ -256,6 +257,14 @@ namespace cmis
libcmis::Session* Content::getSession( const uno::Reference< ucb::XCommandEnvironment >& xEnv )
{
+ // Set the proxy if needed. We are doing that all times as the proxy data shouldn't be cached.
+ ucbhelper::InternetProxyDecider aProxyDecider( m_xContext );
+ INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
+ const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
+ INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), aBindingUrl.GetPort() );
+ rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
+ libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
+
// Look for a cached session, key is binding url + repo id
rtl::OUString sSessionId = m_aURL.getBindingUrl( ) + m_aURL.getRepositoryId( );
if ( NULL == m_pSession )
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index c37d5903e860..afd503c2e011 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -41,6 +41,7 @@
#include <ucbhelper/commandenvironment.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
+#include <ucbhelper/proxydecider.hxx>
#include "auth_provider.hxx"
#include "cmis_content.hxx"
@@ -138,6 +139,14 @@ namespace cmis
void RepoContent::getRepositories( const uno::Reference< ucb::XCommandEnvironment > & xEnv )
{
+ // Set the proxy if needed. We are doing that all times as the proxy data shouldn't be cached.
+ ucbhelper::InternetProxyDecider aProxyDecider( m_xContext );
+ INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
+ const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
+ INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), aBindingUrl.GetPort() );
+ rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
+ libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
+
if ( m_aRepositories.empty() )
{
// Get the auth credentials