original_string: private function process_respond() {
          $lines = explode("\r\n", $this->_header);
          $header_done = false;
          // $this->_error_log($this->_buffer);
          // First line should be a HTTP status line (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6)
          // Format is: HTTP-Version SP Status-Code SP Reason-Phrase CRLF
          list($ret_struct['status']['http-version'],
              $ret_struct['status']['status-code'],
              $ret_struct['status']['reason-phrase']) = explode(' ', $lines[0],3);
  
          // print "HTTP Version: '$http_version' Status-Code: '$status_code' Reason Phrase: '$reason_phrase'<br>";
          // get the response header fields
          // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6
          for($i=1; $i<count($lines); $i++) {
              if (rtrim($lines[$i]) == '' && !$header_done) {
                  $header_done = true;
                  // print "--- response header end ---<br>";
  
              }
              if (!$header_done ) {
                  // store all found headers in array ...
                  list($fieldname, $fieldvalue) = explode(':', $lines[$i]);
                  // check if this header was allready set (apache 2.0 webdav module does this....).
                  // If so we add the the value to the end the fieldvalue, separated by comma...
                  if (empty($ret_struct['header'])) {
                      $ret_struct['header'] = array();
                  }
                  if (empty($ret_struct['header'][$fieldname])) {
                      $ret_struct['header'][$fieldname] = trim($fieldvalue);
                  } else {
                      $ret_struct['header'][$fieldname] .= ',' . trim($fieldvalue);
                  }
              }
          }
          // print 'string len of response_body:'. strlen($response_body);
          // print '[' . htmlentities($response_body) . ']';
          $ret_struct['body'] = $this->_body;
          $this->_error_log('process_respond: ' . var_export($ret_struct,true));
          return $ret_struct;
  
      }
code: private function process_respond() {
          $lines = explode("\r\n", $this->_header);
          $header_done = false;
          // $this->_error_log($this->_buffer);
          // First line should be a HTTP status line (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6)
          // Format is: HTTP-Version SP Status-Code SP Reason-Phrase CRLF
          list($ret_struct['status']['http-version'],
              $ret_struct['status']['status-code'],
              $ret_struct['status']['reason-phrase']) = explode(' ', $lines[0],3);
  
          // print "HTTP Version: '$http_version' Status-Code: '$status_code' Reason Phrase: '$reason_phrase'<br>";
          // get the response header fields
          // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6
          for($i=1; $i<count($lines); $i++) {
              if (rtrim($lines[$i]) == '' && !$header_done) {
                  $header_done = true;
                  // print "--- response header end ---<br>";
  
              }
              if (!$header_done ) {
                  // store all found headers in array ...
                  list($fieldname, $fieldvalue) = explode(':', $lines[$i]);
                  // check if this header was allready set (apache 2.0 webdav module does this....).
                  // If so we add the the value to the end the fieldvalue, separated by comma...
                  if (empty($ret_struct['header'])) {
                      $ret_struct['header'] = array();
                  }
                  if (empty($ret_struct['header'][$fieldname])) {
                      $ret_struct['header'][$fieldname] = trim($fieldvalue);
                  } else {
                      $ret_struct['header'][$fieldname] .= ',' . trim($fieldvalue);
                  }
              }
          }
          // print 'string len of response_body:'. strlen($response_body);
          // print '[' . htmlentities($response_body) . ']';
          $ret_struct['body'] = $this->_body;
          $this->_error_log('process_respond: ' . var_export($ret_struct,true));
          return $ret_struct;
  
      }
code_tokens: private function process_respond ( ) { $ lines = explode ( "\r\n" , $ this -> _header ) ; $ header_done = false ; // $this->_error_log($this->_buffer); // First line should be a HTTP status line (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6) // Format is: HTTP-Version SP Status-Code SP Reason-Phrase CRLF list ( $ ret_struct [ 'status' ] [ 'http-version' ] , $ ret_struct [ 'status' ] [ 'status-code' ] , $ ret_struct [ 'status' ] [ 'reason-phrase' ] ) = explode ( ' ' , $ lines [ 0 ] , 3 ) ; // print "HTTP Version: '$http_version' Status-Code: '$status_code' Reason Phrase: '$reason_phrase'<br>"; // get the response header fields // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 for ( $ i = 1 ; $ i < count ( $ lines ) ; $ i ++ ) { if ( rtrim ( $ lines [ $ i ] ) == '' && ! $ header_done ) { $ header_done = true ; // print "--- response header end ---<br>"; } if ( ! $ header_done ) { // store all found headers in array ... list ( $ fieldname , $ fieldvalue ) = explode ( ':' , $ lines [ $ i ] ) ; // check if this header was allready set (apache 2.0 webdav module does this....). // If so we add the the value to the end the fieldvalue, separated by comma... if ( empty ( $ ret_struct [ 'header' ] ) ) { $ ret_struct [ 'header' ] = array ( ) ; } if ( empty ( $ ret_struct [ 'header' ] [ $ fieldname ] ) ) { $ ret_struct [ 'header' ] [ $ fieldname ] = trim ( $ fieldvalue ) ; } else { $ ret_struct [ 'header' ] [ $ fieldname ] .= ',' . trim ( $ fieldvalue ) ; } } } // print 'string len of response_body:'. strlen($response_body); // print '[' . htmlentities($response_body) . ']'; $ ret_struct [ 'body' ] = $ this -> _body ; $ this -> _error_log ( 'process_respond: ' . var_export ( $ ret_struct , true ) ) ; return $ ret_struct ; }
docstring: Private method process_respond
  
  Processes the webdav server respond and detects its components (header, body).
  and returns data array structure.
  @return array ret_struct
  @access private
docstring_tokens: Private method process_respond