BinPAC &restofflow

Hi,

I've been trying to get &restofflow to work in BinPAC.

Here is a simple .pac file: http://pastebin.com/tmYgnXkd
And the code to call it: http://pastebin.com/2rA3KuU1

With the input file

HEADER
body

I would expect that body_done() and message_done() would be called (but
they aren't).

TEST_Flow::FlowEOF() is calling set_eof() in the upstream FlowBuffer
which sets frame_length_ = 5 (correct for 'body' + '\n'.)

It then calls NewData(0,0) (NULL start/end pointers). The
orig_data_begin_ and orig_data_end_ pointers get squashed and no data is
passed back to the TEST_Body::ParseBuffer().

In FlowBuffer::NewData(), if I add if(begin != NULL) { } around
everything before MarkOrCopy(), things work as expected. I'm not sure if
this is the place to fix this bug or if I'm just doing something wrong
so would like to get some feedback on this.

Regards,
Matt Thompson