--- Begin Message ---
Subject: |
Fixed bug in MHD |
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
--
Dipl.-Inf. Matthias Wachs
Free Secure Network Systems Group
Technische Universitaet Muenchen
Chair for Network Architectures and Services
Institute for Informatics / I8 Tel: +49 89 289 18037
Boltzmannstr. 3 / Room 03.05.042 Fax: +49 89 289 18033
D-85748 Garching b. Muenchen, Germany Email: address@hidden
--- End Message ---