Hi Simon,

On Wed, Nov 27, 2013 at 09:28:57AM +0900, Simon Horman wrote:
> Thanks for merging my patches :-)
> 
> I'll take a look at tightening up both the code and documentation
> to enforce a trailing'\n'.
> 
> As things stand, I believe it does handle messages with a trailing '\n'
> as my testing was done using echo "whatever" | wc -l -p something -q=0.
> 
> I think that if the code looked for a '\n' then the -q=0 would
> not be necessary.

I'm absolutely certain it supports both forms, when I read the patches
I saw strncasecmp() everywhere with the length of the word. That's what
caught my attention. But at the same time I'm sure that we'd regret this
choice in the long term if we were to maintain this mode :-)

Also enforcing the \n ensures we get the complete response. So if later
we support more complex extensions (imagine the server giving us a number
of stats to report in the logs or on the stats page), and the server dies
in the middle of reporting these stats, we could detect it and consider
it down.

Best regards,
Willy


Reply via email to