libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Re: Fwd: Fixed bug in MHD


From: Simon Josefsson
Subject: [libmicrohttpd] Re: Fwd: Fixed bug in MHD
Date: Wed, 25 Aug 2010 22:07:47 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Christian Grothoff <address@hidden> writes:

> Hi Simon,
>
> Could this explain the w32 issue that was reported to the mailinglist?  
> Matthias's patch is in SVN 12727 and 12728...

Hi -- yes, I think an error like this could explain many kind of error
on the client side, since it will result in MHD closing the connections.

I haven't reviwed the patch in detail, but it is generally important to
do the right thing even for GNUTLS_E_AGAIN.

/Simon

> Best,
>
> Christian
>
> From: Matthias Wachs <address@hidden>
> Subject: Fixed bug in MHD
> To: address@hidden
> Date: Tue, 24 Aug 2010 14:20:02 +0200
>
> Hi Christian,
>
> I just fixed a GNUTLS related bug in MHD causing https reliability to
> fail.
> Could you please review my changes so I can be sure everything is OK?
>
> Problem:
>
> - https reliability failed, because MHD was closing HTTP/PUT connection
> from peer1 (sender) to peer2 (receiver) without any notice. 
>
> This happened because in MHD in:
>
> connection.c:1405: do_read (struct MHD_Connection *connection)
>
> bytes_read = connection->recv_cls (...)
>
> was GNUTLS_E_AGAIN (-28). This happened only in https under heavy load.
>
> As you can see in [1] gnutls_record_recv can return GNUTLS_E_AGAIN. In
> this case you should call gnutls_record_recv again, but MHD instead
> returned MHD_NO and closed the connection.
>
> I added some lines in recv_tls_adapter, so gnutls_record_recv is called
> repeatedly if it returns GNUTLS_E_AGAIN.
>
> [1] http://www.linux-faqs.com/man/htmlman3/gnutls_record_recv.3.html
>
> Please review my changes.
>
> Best,
>
> Matthias



reply via email to

[Prev in Thread] Current Thread [Next in Thread]