phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.network.inc.php,1.8.2.3,1.8.2


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.network.inc.php,1.8.2.3,1.8.2.4
Date: Sun, 01 Sep 2002 09:37:19 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv32656/phpgwapi/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.network.inc.php 
Log Message:
GNU Patch #492.

Index: class.network.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.network.inc.php,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -C2 -r1.8.2.3 -r1.8.2.4
*** class.network.inc.php       20 Jul 2002 01:31:24 -0000      1.8.2.3
--- class.network.inc.php       1 Sep 2002 13:37:17 -0000       1.8.2.4
***************
*** 183,196 ****
  
                // return contents of a web url as an array or false if timeout
!               function gethttpsocketfile($file)
                {
                        $server = str_replace('http://','',$file);
                        $file = strstr($server,'/');
                        $server = str_replace($file,'',$server);
                        if 
($GLOBALS['phpgw_info']['server']['httpproxy_server'])
                        {
                                if ($this->open_port($server,80, 15))
                                {
!                                       if (! $this->write_port('GET http://' . 
$server . $file . ' HTTP/1.0'."\r\n\r\n"))
                                        {
                                                return False;
--- 183,207 ----
  
                // return contents of a web url as an array or false if timeout
!               function gethttpsocketfile($file,$user='',$passwd='')
                {
                        $server = str_replace('http://','',$file);
                        $file = strstr($server,'/');
                        $server = str_replace($file,'',$server);
+ 
+                       //allows for access to http-auth pages - added by Dave 
Hall <address@hidden>
+                       if(!((empty($user))&&(empty($passwd))))
+                       {
+                               $auth = 'Authorization: Basic 
'.base64_encode("$user:$passwd")."\n";
+                       }
+                       else
+                       {
+                               $auth = '';
+                       }
+ 
                        if 
($GLOBALS['phpgw_info']['server']['httpproxy_server'])
                        {
                                if ($this->open_port($server,80, 15))
                                {
!                                       if (! $this->write_port('GET http://' . 
$server . $file . ' HTTP/1.0'."\n".$auth."\r\n\r\n"))
                                        {
                                                return False;
***************
*** 218,222 ****
                                if ($this->open_port($server, 80, 15))
                                {
!                                       if (!$this->write_port('GET '.$file.' 
HTTP/1.0'."\n".'Host: '.$server."\r\n\r\n"))
                                        {
                                                return 0;
--- 229,233 ----
                                if ($this->open_port($server, 80, 15))
                                {
!                                       if (!$this->write_port('GET '.$file.' 
HTTP/1.0'."\n".'Host: '.$server."\n".$auth."\r\n\r\n"))
                                        {
                                                return 0;
***************
*** 236,238 ****
                }
        }
! ?>
--- 247,249 ----
                }
        }
! ?>
\ No newline at end of file





reply via email to

[Prev in Thread] Current Thread [Next in Thread]