Open GoogleCodeExporter opened 9 years ago
I dug a bit into the code and found function "bufferComplete($buff)". I can fix
my problem if I modify it to wait for the first complete tag at the beginning
of the stream (See below). Just as a test, I hardcoded it - if this really is
the problem/fix it needs to be made generic so it can handle any first tag.
protected function bufferComplete($buff)
{
if (substr($buff, -1) != '>') {
return false;
}
//we always have a space since the namespace needs to be
//declared. could be a tab, though
$start = substr($buff, 1, strpos($buff, ' ', 2) - 1);
$stop = substr($buff, -strlen($start) - 3);
// Hardcoding the start of the steam to include the first complete tag -
// Test only - Not a generic solution
$fstop = substr($buff, -strlen("stream:features") - 3);
if ($start == '?xml') {
if ('</' . "stream:features" . '>' == $fstop) {
return true;
}
}
if (substr($stop, -2) == '/>') {
//one tag, i.e. <success />
return true;
}
if ('</' . $start . '>' == $stop) {
return true;
}
return false;
}
Original comment by hewmor...@yahoo.com
on 12 Dec 2010 at 1:01
Original issue reported on code.google.com by
hewmor...@yahoo.com
on 11 Dec 2010 at 11:09