Summary | "spamassassin -r" reporting fails |
Queue | IMP |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | athakur (at) gmail (dot) com |
Created | 01/31/2006 (7121 days ago) |
Due | |
Updated | 01/31/2006 (7121 days ago) |
Assigned | |
Resolved | 01/31/2006 (7121 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ "spamassassin -r" reporting fails
Queue ⇒ IMP
version of Horde and IMP and using PHP in CGI mode. I was have a
problem where using the "report as spam" link would cause a 406 error.
This is happening because "spamassassin -r" causes a "x message(s)
examined" message to be output on STDOUT. This output is not trapped
by the PHP script and passes straight to STDOUT. This happens before
PHP outputs a "Content-Type" header causing the web server to report
an error.
I tried updating Spam.php to the latest CVS version and it did not
help the problem. I figured out a way around it though. Spam.php
needs to catch pipe 1 (STDOUT) as well. I made the following change:
Original:
$proc = proc_open($prog,
array(0 => array('pipe', 'r'),
2 => array('pipe', 'w')),
$pipes);
Updated:
$proc = proc_open($prog,
array(0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'w')),
$pipes);
And it works correctly now.