PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_Sieve » Bug #591

Net_Sieve doesn't handle 'bye'

Details

Submitted2004-01-16 10:00 UTC
FromMark at 2pmtech dot co dot uk
Assigneddamian
StatusClosed
PackageNet_Sieve
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-01-16 10:00 UTC] Mark at 2pmtech dot co dot uk

Description:
------------
When Net_Sieve is communicating with a version of the Cyrus Timsieved that has the distributed 'murder' architecture enabled.

If you connect to a timsieved for a user that the server does not host, the timsieved will responde with a 'bye' referral response that Net_Sieve does not see as finishing the conversation.

The following patch fixes this problem

--- Sieve.php-orig 2003-09-26 11:17:15.000000000 +0100
+++ Sieve.php 2003-09-26 11:17:30.000000000 +0100
@@ -526,10 +526,15 @@
$line .= str_replace("\r\n", ' ', $this->_sock->read($matches[1]));
}
return PEAR::raiseError(trim($response . substr($line, 2)));
+ } elseif ('bye' == strtolower(substr($line, 0, 3))) {
+ if (preg_match('/^bye \((referral) "([^"]+)/i', $line, $matches)) {
+ $line = $matches[1] . " " . $matches[2];
+ }
+ return PEAR::raiseError(trim($response . $line));
}

$response .= $line . "\r\n";
}
}
}
?>

[2004-01-31 19:36 UTC] damian at php dot net

Thank you for your bug report. This issue has already been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/packages.php

Fixed in release 0.9