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.12,1.13


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

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

Modified Files:
        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.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.network.inc.php       20 Jul 2002 01:32:00 -0000      1.12
--- class.network.inc.php       1 Sep 2002 13:37:10 -0000       1.13
***************
*** 188,201 ****
                 opened and closed on a single line).
                */
!               function gethttpsocketfile($file,$string=False)
                {
                        $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;
--- 188,212 ----
                 opened and closed on a single line).
                */
!               function 
gethttpsocketfile($file,$string=False,$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;
***************
*** 232,236 ****
                                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;
--- 243,247 ----
                                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;
***************
*** 259,261 ****
                }
        }
! ?>
--- 270,272 ----
                }
        }
! ?>
\ No newline at end of file





reply via email to

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