[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnutls-cli: handle binary data from stdin
From: |
Vitaly Mayatskikh |
Subject: |
Re: gnutls-cli: handle binary data from stdin |
Date: |
Wed, 27 Jan 2010 10:59:00 +0100 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/23.1 Mule/6.0 (HANACHIRUSATO) |
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
> transparent.
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.
--
wbr, Vitaly