Commit f58d46f2 authored by sebastian's avatar sebastian

ZP-608 #comment limit WBXML-out to 512K

git-svn-id: https://z-push.org/svn/z-push/trunk@1965 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 00c0e85f
......@@ -516,13 +516,20 @@ class WBXMLEncoder extends WBXMLDefs {
}
/**
* Writes the sent WBXML data to the log
* Writes the sent WBXML data to the log if it is not bigger than 512K.
*
* @access private
* @return void
*/
private function writeLog() {
ZLog::Write(LOGLEVEL_WBXML, "WBXML-OUT: ". base64_encode(stream_get_contents($this->_outLog, -1,0)), false);
$stat = fstat($this->_outLog);
if ($stat['size'] < 524288) {
$data = base64_encode(stream_get_contents($this->_outLog, -1,0));
}
else {
$data = "more than 512K of data";
}
ZLog::Write(LOGLEVEL_WBXML, "WBXML-OUT: ". $data, false);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment