Skip to content

Commit

Permalink
Merge 64f532a into 958625c
Browse files Browse the repository at this point in the history
  • Loading branch information
elabz committed Feb 6, 2019
2 parents 958625c + 64f532a commit 1da428f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Command/PostArticleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ public function __invoke()
'From: '.$this->from,
'Newsgroups: '.$this->groups,
'Subject: '.$this->subject,
'X-poster: php-nntp',
];

if (null !== $this->headers) {
$article[] = $this->headers;
}

if (!preg_grep('/^X-poster/', $article)) {
$article[] = 'X-poster: php-nntp';
}

$article[] = "\r\n".$this->body;

return implode("\r\n", $article);
Expand Down
1 change: 1 addition & 0 deletions src/Command/PostCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function __invoke()

public function onSendArticle(Response $response)
{
return $response;
}

public function onPostingNotPermitted(Response $response)
Expand Down
2 changes: 1 addition & 1 deletion src/Connection/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Connection implements ConnectionInterface
{
const BUFFER_SIZE = 1024;
const BUFFER_SIZE = 2048;

/**
* @var string
Expand Down

0 comments on commit 1da428f

Please sign in to comment.