gnutls-cli: handle binary data from stdin
v.mayatskih at gmail.com
Wed Jan 27 10:59:00 CET 2010
At Wed, 27 Jan 2010 10:31:04 +0100, Simon Josefsson wrote:
> > This trivial patch fixes the problem.
> Thanks. How well have you tested it?
I use it for 5 days now to handle all my email traffic. Besides Google
mail, which supports compression, there's corporate server, which
doesn't support it, so gnutls-cli processes only text there.
> I'm surprised there aren't more text-oriented assumptions in the
> code. However I believe we should use getline instead of fgets/read
> to avoid the fixed size buffer. It should handle binary data
It shouldn't stop reading at any delimiter, like null, CR or LF
characters. Unless I miss something, I don't see the problem with
fixed size buffer, because data sent over network can be split by
network devices anyway.
More information about the Gnutls-devel