diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2002-10-24 10:59:14 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2002-10-24 10:59:14 +0000 |
commit | 3ec89c4ea260e592cee126497634a1aa8e057587 (patch) | |
tree | f6867564f7aa2c9c41545f8ce5161711ec56e272 /ucb | |
parent | 51d20be3531a1c7b6731095c3ef47352328eaeee (diff) |
#104239# - FTP over HTTP proxy server works again.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 47 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.hxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSession.hxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.hxx | 13 |
5 files changed, 55 insertions, 28 deletions
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index fef68241d495..fee0382b651c 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DAVResourceAccess.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: kso $ $Date: 2002-09-18 12:46:13 $ + * last change: $Author: kso $ $Date: 2002-10-24 11:59:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -213,7 +213,7 @@ void DAVResourceAccess::OPTIONS( DAVCapabilities & rCapabilities, bRetry = sal_False; try { - m_xSession->OPTIONS( m_aPath, + m_xSession->OPTIONS( getRequestURI(), rCapabilities, DAVRequestEnvironment( new AuthListener( xEnv ) ) ); @@ -244,7 +244,7 @@ void DAVResourceAccess::PROPFIND( const Depth nDepth, bRetry = sal_False; try { - m_xSession->PROPFIND( m_aPath, + m_xSession->PROPFIND( getRequestURI(), nDepth, rPropertyNames, rResources, @@ -276,7 +276,7 @@ void DAVResourceAccess::PROPFIND( const Depth nDepth, bRetry = sal_False; try { - m_xSession->PROPFIND( m_aPath, + m_xSession->PROPFIND( getRequestURI(), nDepth, rResInfo, DAVRequestEnvironment( @@ -306,7 +306,7 @@ void DAVResourceAccess::PROPPATCH( const std::vector< ProppatchValue >& rValues, bRetry = sal_False; try { - m_xSession->PROPPATCH( m_aPath, + m_xSession->PROPPATCH( getRequestURI(), rValues, DAVRequestEnvironment( new AuthListener( xEnv ) ) ); @@ -336,7 +336,7 @@ void DAVResourceAccess::HEAD( const std::vector< rtl::OUString > & rHeaderNames, bRetry = sal_False; try { - m_xSession->HEAD( m_aPath, + m_xSession->HEAD( getRequestURI(), rHeaderNames, rResource, DAVRequestEnvironment( @@ -366,7 +366,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( bRetry = sal_False; try { - xStream = m_xSession->GET( m_aPath, + xStream = m_xSession->GET( getRequestURI(), DAVRequestEnvironment( new AuthListener( xEnv ) ) ); } @@ -396,7 +396,7 @@ void DAVResourceAccess::GET( uno::Reference< io::XOutputStream > & rStream, bRetry = sal_False; try { - m_xSession->GET( m_aPath, + m_xSession->GET( getRequestURI(), rStream, DAVRequestEnvironment( new AuthListener( xEnv ) ) ); @@ -427,7 +427,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( bRetry = sal_False; try { - xStream = m_xSession->GET( m_aPath, + xStream = m_xSession->GET( getRequestURI(), rHeaderNames, rResource, DAVRequestEnvironment( @@ -461,7 +461,7 @@ void DAVResourceAccess::GET( bRetry = sal_False; try { - m_xSession->GET( m_aPath, + m_xSession->GET( getRequestURI(), rStream, rHeaderNames, rResource, @@ -492,7 +492,7 @@ void DAVResourceAccess::PUT( const uno::Reference< io::XInputStream > & rStream, bRetry = sal_False; try { - m_xSession->PUT( m_aPath, + m_xSession->PUT( getRequestURI(), rStream, DAVRequestEnvironment( new AuthListener( xEnv ) ) ); @@ -524,7 +524,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( bRetry = sal_False; try { - xStream = m_xSession->POST( m_aPath, + xStream = m_xSession->POST( getRequestURI(), rContentType, rReferer, rInputStream, @@ -561,7 +561,7 @@ void DAVResourceAccess::POST( bRetry = sal_False; try { - m_xSession->POST( m_aPath, + m_xSession->POST( getRequestURI(), rContentType, rReferer, rInputStream, @@ -592,7 +592,7 @@ void DAVResourceAccess::MKCOL( const uno::Reference< bRetry = sal_False; try { - m_xSession->MKCOL( m_aPath, + m_xSession->MKCOL( getRequestURI(), DAVRequestEnvironment( new AuthListener( xEnv ) ) ); } @@ -683,7 +683,7 @@ void DAVResourceAccess::DESTROY( const uno::Reference< bRetry = sal_False; try { - m_xSession->DESTROY( m_aPath, + m_xSession->DESTROY( getRequestURI(), DAVRequestEnvironment( new AuthListener( xEnv ) ) ); } @@ -743,7 +743,7 @@ void DAVResourceAccess::initialize() if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL ) ) { - m_xSession = 0; + m_xSession.clear(); // create new webdav session m_xSession @@ -763,6 +763,19 @@ void DAVResourceAccess::initialize() } //========================================================================= +const rtl::OUString & DAVResourceAccess::getRequestURI() const +{ + OSL_ENSURE( m_xSession.is(), + "DAVResourceAccess::getRequestURI - Not initialized!" ); + + // In case a proxy is used we have to use the absolute URI for a request. + if ( m_xSession->UsesProxy() ) + return m_aURL; + + return m_aPath; +} + +//========================================================================= sal_Bool DAVResourceAccess::detectRedirectCycle( const rtl::OUString& rRedirectURL ) { diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index a81c486642ac..5f702d754d5d 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DAVResourceAccess.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: kso $ $Date: 2002-09-16 14:37:11 $ + * last change: $Author: kso $ $Date: 2002-10-24 11:59:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -273,6 +273,7 @@ public: throw( DAVException ); private: + const rtl::OUString & getRequestURI() const; sal_Bool detectRedirectCycle( const rtl::OUString& rRedirectURL ); sal_Bool handleException( DAVException & e ); void initialize() diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 7213a310bfd0..5667c679cf74 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DAVSession.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: kso $ $Date: 2002-09-18 12:46:13 $ + * last change: $Author: kso $ $Date: 2002-10-24 11:59:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -118,6 +118,8 @@ public: virtual sal_Bool CanUse( const ::rtl::OUString & inPath ) = 0; + virtual sal_Bool UsesProxy() = 0; + // DAV methods // diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 6f56309fedf9..28699bcea5f5 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonSession.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: kso $ $Date: 2002-09-18 12:46:13 $ + * last change: $Author: kso $ $Date: 2002-10-24 11:59:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -583,6 +583,7 @@ NeonSession::~NeonSession( ) } // ------------------------------------------------------------------- +// virtual sal_Bool NeonSession::CanUse( const rtl::OUString & inUri ) { NeonUri theUri( inUri ); @@ -595,6 +596,13 @@ sal_Bool NeonSession::CanUse( const rtl::OUString & inUri ) } // ------------------------------------------------------------------- +// virtual +sal_Bool NeonSession::UsesProxy() +{ + return ( m_aProxyName.getLength() > 0 ); +} + +// ------------------------------------------------------------------- // OPTIONS // ------------------------------------------------------------------- void NeonSession::OPTIONS( const rtl::OUString & inPath, diff --git a/ucb/source/ucp/webdav/NeonSession.hxx b/ucb/source/ucp/webdav/NeonSession.hxx index 787e5f92ca2c..5dca43c54388 100644 --- a/ucb/source/ucp/webdav/NeonSession.hxx +++ b/ucb/source/ucp/webdav/NeonSession.hxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonSession.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: kso $ $Date: 2002-09-18 12:46:14 $ + * last change: $Author: kso $ $Date: 2002-10-24 11:59:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -117,9 +117,7 @@ class NeonSession : public DAVSession // DAVSession methods virtual sal_Bool CanUse( const ::rtl::OUString & inUri ); - const rtl::OUString & getHostName() const { return m_aHostName; } - - const void * getRequestData() const { return m_pRequestData; } + virtual sal_Bool UsesProxy(); const DAVRequestEnvironment & getRequestEnvironment() const { return m_aEnv; } @@ -252,6 +250,11 @@ class NeonSession : public DAVSession throw ( DAVException ); */ + // helpers + const rtl::OUString & getHostName() const { return m_aHostName; } + + const void * getRequestData() const { return m_pRequestData; } + private: // Initialise "Neon sockets" void Init( void ) |