Ignore:
Timestamp:
2011/10/31 13:54:41 (12 years ago)
Author:
kotani
Message:

#1521 (PEAR::SOAP 配布と異なる部分がある)

  • 新しいバージョンの配布ファイルを上書きすることで解決
  • →2.11.4には含めないため一旦コミットキャンセル

#1522 (PEAR::SOAP をバージョンアップ)

  • 0.11.0 -> 0.12.0
  • →2.11.4には含めないため一旦コミットキャンセル
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/module/SOAP/Server.php

    r21299 r21304  
    176176            /* We'll try to build our endpoint. */ 
    177177            $this->endpoint = 'http://' . $_SERVER['SERVER_NAME']; 
    178             if (isset($_SERVER['SERVER_PORT'])) { 
     178            if ($_SERVER['SERVER_PORT']) { 
    179179                $this->endpoint .= ':' . $_SERVER['SERVER_PORT']; 
    180180            } 
     
    186186        if (isset($_SERVER['CONTENT_TYPE'])) { 
    187187            if (strcasecmp($_SERVER['CONTENT_TYPE'], 'application/dime') == 0) { 
    188                 $this->_decodeDIMEMessage($data, $this->headers, $attachments); 
     188                $this->_decodeDIMEMessage($data, $headers, $attachments); 
    189189                $useEncoding = 'DIME'; 
    190190            } elseif (stristr($_SERVER['CONTENT_TYPE'], 'multipart/related')) { 
     
    193193                    stripslashes($_SERVER['CONTENT_TYPE']) . 
    194194                    "\r\n\r\n" . $data; 
    195                 $this->_decodeMimeMessage($data, $this->headers, $attachments); 
     195                $this->_decodeMimeMessage($data, $headers, $attachments); 
    196196                $useEncoding = 'Mime'; 
    197197            } 
    198             if (!isset($this->headers['content-type'])) { 
    199                 $this->headers['content-type'] = stripslashes($_SERVER['CONTENT_TYPE']); 
     198            if (!isset($headers['content-type'])) { 
     199                $headers['content-type'] = stripslashes($_SERVER['CONTENT_TYPE']); 
    200200            } 
    201201            if (!$this->fault && 
    202                 !$this->_getContentEncoding($this->headers['content-type'])) { 
     202                !$this->_getContentEncoding($headers['content-type'])) { 
    203203                $this->xml_encoding = SOAP_DEFAULT_ENCODING; 
    204204                /* Found encoding we don't understand; return a fault. */ 
     
    210210         * WSDL file. */ 
    211211        if (!$this->fault && !$test && 
    212             ((isset($_SERVER['REQUEST_METHOD']) && 
    213               $_SERVER['REQUEST_METHOD'] != 'POST') || 
    214              (isset($this->headers['content-type']) && 
    215               strncmp($this->headers['content-type'], 'text/xml', 8) != 0))) { 
     212            ($_SERVER['REQUEST_METHOD'] != 'POST' || 
     213             strncmp($headers['content-type'], 'text/xml', 8) != 0)) { 
    216214            /* This is not possibly a valid SOAP request, try to return a WSDL 
    217215             * file. */ 
    218             $got = isset($this->headers['content-type']) ? $this->headers['content-type'] : 'Nothing!'; 
    219             $this->_raiseSoapFault('Invalid SOAP request, must be POST with content-type: text/xml, got: ' . $got, '', '', 'Server'); 
     216            $this->_raiseSoapFault('Invalid SOAP request, must be POST with content-type: text/xml, got: ' . (isset($headers['content-type']) ? $headers['content-type'] : 'Nothing!'), '', '', 'Server'); 
    220217        } 
    221218 
     
    383380    { 
    384381        /* Parse response, get SOAP_Parser object. */ 
    385         $parser = new SOAP_Parser($data, $this->xml_encoding, $attachments); 
    386  
     382        $parser =& new SOAP_Parser($data, $this->xml_encoding, $attachments); 
     383        /* If fault occurred during message parsing. */ 
    387384        if ($parser->fault) { 
    388             /* Fault occurred during message parsing. */ 
    389385            $this->fault = $parser->fault; 
    390             return null; 
    391         } 
    392         if (!count($parser->root_struct_name)) { 
    393             /* No method specified. */ 
    394             $this->_raiseSoapFault('No method specified in request.'); 
    395386            return null; 
    396387        } 
     
    553544        if (is_array($requestArray)) { 
    554545            if (isset($requestArray['faultcode']) || 
    555                 isset($requestArray[SOAP_BASE::SOAPENVPrefix().':faultcode'])) { 
     546                isset($requestArray['SOAP-ENV:faultcode'])) { 
    556547                $faultcode = $faultstring = $faultdetail = $faultactor = ''; 
    557548                foreach ($requestArray as $k => $v) { 
     
    809800     * @return void 
    810801     */ 
    811     function addObjectWSDL($wsdl_obj, $targetNamespace, $service_name, 
     802    function addObjectWSDL(&$wsdl_obj, $targetNamespace, $service_name, 
    812803                           $service_desc = '') 
    813804    { 
Note: See TracChangeset for help on using the changeset viewer.