[Help-gnutls] Re: gnutls_record_send() problem
simon at josefsson.org
Wed Jan 23 18:25:02 CET 2008
Laurent Birtz <laurent.birtz at kryptiva.com> writes:
> I've encountered a weird problem with the stock code examples (anonymous
> server and client). By itself the example works fine, but if I replace
> the string sent ("GET / HTTP/1.0\r\n\r\n") by a zeroed buffer, then the
> client hangs. This does not occur if I send a buffer containing bytes
> with the value 1.
> The sample code is shown below. I am using GnuTLS 2.2.1-1, kernel
> 2.6.22-3-686, Debian unstable, Debian package libgnutls26. Can someone
> tell me what is going on?
I can reproduce this. The reason is this: The server is waiting for the
client to send something, which it echoes back, but since the client
never sends anything (a zero string is no data) the server never
responds, and the client is stuck waiting for input from the server.
More information about the Gnutls-help