I found that the NNTP gateway was choking on some articles that had a period on a line by itself.
This seems to be used to indicate the end of the article, but in fact, there was more text to follow.
I worked around this by changing function
get_article in
nntp.php. I replaced this code:
Code:
while(!feof($this->fp)) {
//$line = trim(fgets($this->fp, 256));
//Took out the length, some lines are longer than that
$line = trim(fgets($this->fp));
if ($line == ".") {
break;
} else {
$post .= $line ."\n";
}
}
...with this:
Code:
while(!feof($this->fp)) {
$line = fgets($this->fp);
if ($line == ".\r\n") {
break;
} else {
$post .= rtrim($line, "\r\n") ."\n";
}
}
BTW, the original code appears to strip leading blanks from each line. This is probably wrong, so I made it strip only the cr/lf.
David