Index: setup/templates/default/config.tpl
===================================================================
RCS file: /cvsroot/phpgroupware/setup/templates/default/config.tpl,v
retrieving revision 1.3.2.5
diff -u -r1.3.2.5 config.tpl
--- setup/templates/default/config.tpl 28 Oct 2003 22:31:28 -0000 1.3.2.5
+++ setup/templates/default/config.tpl 13 Jan 2004 09:01:42 -0000
@@ -25,7 +25,7 @@
- {lang_Enter_the_full_path_for_users_and_group_files. Examples:_/files,_E:\FILES}: {lang_This_has_to_be_outside_the_webservers_document-root!!!} {lang_or_http://webdav.domain.com_(WebDAV)}: |
+ {lang_Enter_the_full_path_for_users_and_group_files. Examples:_/files,_E:\FILES}: {lang_This_has_to_be_outside_the_webservers_document-root!!!} {lang_or_http://webdav.domain.com_(WebDAV)}:{lang_(in_case_of_php_version_is_>_4.3.0_https://webdav.domain.com_is_also_ok)} |
|
Index: phpgwapi/inc/class.http_dav_client.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.http_dav_client.inc.php,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 class.http_dav_client.inc.php
--- phpgwapi/inc/class.http_dav_client.inc.php 27 Apr 2003 21:49:51 -0000 1.3.2.1
+++ phpgwapi/inc/class.http_dav_client.inc.php 13 Jan 2004 09:10:28 -0000
@@ -570,15 +570,17 @@
@abstract connects to the server
@param dav_host The host to connect to
@param dav_port The port to connect to
+ @param dav_scheme http or ssl (optional)
@discussion
If the server requires authentication you will need to set credentials
with set_credentials first
*/
- function connect($dav_host,$dav_port)
+ function connect($dav_host,$dav_port,$dav_scheme='http')
{
$this->dav_host = $dav_host;
$this->dav_port = $dav_port;
+ $this->dav_scheme = $dav_scheme;
$this->http_client->addHeader('Host',$this->dav_host);
$this->http_client->addHeader('Connection','close');
//$this->http_client->addHeader('transfer-encoding','identity');
@@ -587,6 +589,7 @@
$this->http_client->addHeader('Accept-Encoding','chunked');
$this->http_client->setProtocolVersion( '1.1' );
$this->http_client->addHeader( 'user-agent', 'Mozilla/5.0 (compatible; PHPGroupware dav_client/1; Linux)');
+ $this->http_client->url['scheme'] = $this->dav_scheme;
return $this->http_client->Connect($dav_host,$dav_port);
}
function set_debug($debug)
Index: phpgwapi/inc/class.net_http_client.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.net_http_client.inc.php,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 class.net_http_client.inc.php
--- phpgwapi/inc/class.net_http_client.inc.php 27 Apr 2003 21:49:51 -0000 1.1.2.1
+++ phpgwapi/inc/class.net_http_client.inc.php 13 Jan 2004 09:10:28 -0000
@@ -273,7 +273,16 @@
{
if( $this->debug & DBGTRACE ) echo "Connect( $host, $port ) \n";
- $this->url['scheme'] = "http";
+ if ( empty($this->url['scheme']) )
+ {
+ $this->url['scheme'] = "http";
+ }
+ /* Unfortunately older version are not supported */
+ if ( ($this->url['scheme'] == 'ssl' || $this->url['scheme'] == 'tls')&& version_compare(phpversion(),"4.3.0") < 0 )
+ {
+ echo("Error :: You try to access an ssl webdav repository while your php is not supporting it ! please upgrade !
" );
+ return false;
+ }
$this->url['host'] = $host;
if( $port != NULL )
$this->url['port'] = $port;
@@ -660,7 +669,7 @@
$host = $this->proxyHost;
$port = $this->proxyPort;
} else {
- $host = $this->url['host'];
+ $host = $this->url['scheme'].'://'.$this->url['host'];
$port = $this->url['port'];
}
if( $port == "" ) $port = 80;
Index: phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.vfs_dav.inc.php,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 class.vfs_dav.inc.php
--- phpgwapi/inc/class.vfs_dav.inc.php 9 Jan 2004 09:18:41 -0000 1.1.2.4
+++ phpgwapi/inc/class.vfs_dav.inc.php 13 Jan 2004 09:10:28 -0000
@@ -122,14 +122,31 @@
$this->repository = $GLOBALS['phpgw_info']['server']['files_dir'];
$this->dav_user=$GLOBALS['phpgw_info']['user']['userid'];
$this->dav_pwd=$GLOBALS['phpgw_info']['user']['passwd'];
+ /* We need to take care of ssl / no ssl repository !(done when trying to connect) */
+ /* If php_version <= 4.3.0 */
$parsed_url = parse_url($this->repository);
+ /* The scheme first */
+ $this->dav_scheme=@isset($parsed_url['scheme']) ? $parsed_url['scheme'] : "http";
+
+ /*Then the host */
$this->dav_host=$parsed_url['host'];
- $this->dav_port=@isset($parsed_url['port']) ? $parsed_url['port'] : 80;
+
+ /* Then the port */
+ if ( $this->dav_scheme=="https" )
+ {
+ $this->dav_port=@isset($parsed_url['port']) ? $parsed_url['port'] : 443;
+ $this->dav_scheme="ssl";
+ }
+ else
+ {
+ $this->dav_port=@isset($parsed_url['port']) ? $parsed_url['port'] : 80;
+ $this->dav_scheme="http";
+ }
$this->dav_client = CreateObject('phpgwapi.http_dav_client');
$this->dav_client->set_credentials($this->dav_user,$this->dav_pwd);
$this->dav_client->set_attributes($this->attributes,$this->vfs_property_map);
- $result = $this->dav_client->connect($this->dav_host,$this->dav_port);
+ $result = $this->dav_client->connect($this->dav_host,$this->dav_port,$this->dav_scheme);
if (DEBUG_DAV)
{
echo 'DAV client debugging enabled!';