Re: umlaut problem

"Gregor G." <[email protected]>
Newsgroups gmane.comp.horde.sync
Message-ID <[email protected]>
Jan Schneider schrieb:
> You can put a
> Horde::logMessage($_SERVER['CONTENT_TYPE'], __FILE__, __LINE__, 
> PEAR_LOG_ERR);
> somewhere in rpc.php and check what's being logged.
Please excuse if this is a stupid question: Do i need to install and 
include the PEAR Log class to do so or is lib/Horde/Log.php used for 
this? Do i have to configure the logging of PEAR_LOG_ERROR somewhere in 
Horde? Where will i find the log afterwards?
I put your line in rpc.php right at the beginning, the log 
(/tmp/horde.log) is at http://www.pastebin.org/pastebin.php?dl=84023:

/* Look at the Content-type of the request, if it is available, to try
 * and determine what kind of request this is. */
Horde::logMessage($_SERVER['CONTENT_TYPE'], __FILE__, __LINE__, 
PEAR_LOG_ERR);
if (!empty($_SERVER['PATH_INFO']) ||
    in_array($_SERVER['REQUEST_METHOD'], array('DELETE', 'PROPFIND', 
'PUT', 'OPTIONS'))) {
    $serverType = 'webdav';
} elseif (!empty($_SERVER['CONTENT_TYPE'])) {
    if (strpos($_SERVER['CONTENT_TYPE'], 'application/vnd.syncml+xml') 
!== false) {
        $serverType = 'syncml';
        /* Syncml does its own session handling. */
        $session_control = 'none';
        $no_compress = true;
    } elseif (strpos($_SERVER['CONTENT_TYPE'], 
'application/vnd.syncml+wbxml') !== false) {
        $serverType = 'syncml_wbxml';
        /* Syncml does its own session handling. */
        $session_control = 'none';
        $no_compress = true;
    } elseif (strpos($_SERVER['CONTENT_TYPE'], 'text/xml') !== false) {
        $input = Horde_RPC::getInput();
        /* Check for SOAP namespace URI. */
        if (strpos($input, 'http://schemas.xmlsoap.org/soap/envelope/') 
!== false) {
            $serverType = 'soap';
        } else {
            $serverType = 'xmlrpc';
        }
    } elseif (strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== 
false) {
        $serverType = 'jsonrpc';
    } else {
        header('HTTP/1.0 501 Not Implemented');
        exit;
    }
} elseif (!empty($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] 
== 'phpgw') {
    $serverType = 'phpgw';
} else {
    $serverType = 'soap';
}

if ($serverType == 'soap') {
    if (!isset($_SERVER['REQUEST_METHOD']) ||
        $_SERVER['REQUEST_METHOD'] != 'POST') {
        $session_control = 'none';
        $params['requireAuthorization'] = false;
        if (Util::getGet('wsdl') !== null) {
            $input = 'wsdl';
        } else {
            $input = 'disco';
        }
    } elseif (class_exists('SoapServer')) {
        $serverType = 'PhpSoap';
    }
}

Regards Gregor

-- 
Partykeller
www.meineparty.at

-- 
sync mailing list - Join the hunt: http://horde.org/bounties/#sync
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.