[Chameleon-dev] [Bug 1394] [phpwms] should use http client for http communication

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Apr 3 05:30:13 EDT 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1394





------- Additional Comments From bartvde at xs4all.nl  2006-04-03 05:30 -------
File: server_data_manager.php
Function: getCapabilities

       set_time_limit( $this->nMaxExecutionTime );
       
       include_once(dirname(__FILE__)."/../http/HTTPClient.php");
       $fpOut = fopen($szCacheFname, "w");
       $oHTTPClient = new HTTPClient("", $fpOut);
       if ( ! $oHTTPClient->doGET($szOnlineResource) )
       {
          // log error
          $this->error( ERR_WARNING, $oHTTPClient->mszLastError);
          return false;
       }

Comment out most of the rest of the code:
        // open a pointer to the input file
        /*if (false === ($fpIn = fopen($szOnlineResource, "r")))
        {
            // log error
            $this->error( ERR_WARNING, "Could not access $szOnlineResource");
            return false;
        }*/

        // open a pointer to the receiving file
        /*if (!($fpOut = fopen($szCacheFname, "w")))
        {
            // log error
            $this->error( ERR_WARNING, "Could not open $szCacheFname");
            return false;
        }*/

        // copy the file line by line
        /*while($fpIn && !feof($fpIn))
        {
            // build buffer
            $line = fgets($fpIn, 4096);

            // rewrite encoding tag
            $line = str_replace( "encoding=\"UTF-8\"", "encoding=\"ISO-8859-1\"",
                                 $line );
            // write the buffer to file
            fwrite($fpOut, $line, strlen($line));
        }*/

        // force a buffer write
        fflush( $fpOut );

        // close the files
        //fclose($fpIn);
        fclose($fpOut);




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list