robinvdvleuten / php-nntp

Client for communicating with servers throught the Network News Transfer Protocol (NNTP) protocol.
MIT License
39 stars 12 forks source link

Fix messages being truncated #15

Closed Anahkiasen closed 9 years ago

Anahkiasen commented 9 years ago

You're currently stopping the stream when encountering .\r\n but this means such a message:

Hi,

I like pasta.

My regards
.

Would get truncated at pasta. This makes sure we're looking for the actual end of message period (alone on a new line) instead of any period that is at the end of a line.


Closes #13

Anahkiasen commented 9 years ago

Not sure how to add a test for this one

robinvdvleuten commented 9 years ago

There aren't many tests for the connection command. I am still figuring out a way to simulate a socket connection in phpunit