From:
John Muth <muth@parascale.com>
To:
libmicrohttpd@gnu.org
Date:
Yesterday 18:35:25
Hi Christian,
We are using libmicro http in our application. Our application runs on Linux
and uses a large number of file descriptors (> 1024). Unfortunately the
Linux fdset's only have room for 1024 fd's.
I made changes to the 0.4.4 source to support poll instead of select so we
could get around the file descriptor issue. I've attached the diffs if you
are interested.
-John Muth
Parascale
Jon Nalley <lists@bluebot.org>
To:
libmicrohttpd development and user mailinglist <libmicrohttpd@gnu.org>
Date:
Today 11:34:10 am
Hi,
I believe I may have found a small bug in postprocessor.c.
--- begin excerpt @ line 266 postprocessor.c ---
if (0 != strncasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED, encoding,
strlen (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA)))
--- end excerpt ---
Shouldn't it be strlen(MHD_HTTP_POST_ENCODING_FORM_URLENCODED) ???
Regards,
Jon Nalley
Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
To:
christian@grothoff.org
Date:
Today 13:07:40
Attachments:
libmicro.diff
Spam Status: Spamassassin 0% probability of being spam.
Full report:
No, score=-2.6 required=7.0 tests=BAYES_00 autolearn=ham version=3.2.5-tuminfo_1
hi,
attached patch fixes two leaks of retVal in error paths found by cppcheck.
Regards, Eric
Mike Crowe <mac@mcrowe.com>
To:
libmicrohttpd@gnu.org
Date:
Yesterday 17:41:12
I've found a difficult to reproduce deadlock in v0.4.2 when calling
MHD_stop_daemon while a connection is active. I narrowed it down to
MHD_handle_connection racing against MHD_cleanup_connections. It can
be reproduced much more easily by inserting a sleep just before the
call to SELECT in MHD_handle_connection. I'm using
MHD_USE_THREAD_PER_CONNECTION.
The problem appears to occur when MHD_stop_daemon sets
daemon->shutdown and sends SIGALRM signal to the thread running inside
MHD_handle_connection while it is between the top of the loop where
con->daemon->shutdown is checked and the call to SELECT. The signal
has no persistent effect and the thread ends up blocked forever inside
select.
The only workarounds I can come up with are using an explicit pipe to
wake the thread (which is stateful so it can be relied upon to wake
the select) or to force the socket closed so that the select wakes up
(but this sounds rather more dangerous and is racey if anyone else is
opening file descriptors.)
Here's a patch which reproduces the problem under 'make check'. I'm
running on Debian GNU/Linux 5.0 on amd64 but I've also reproduced the
problem on i386.
I can clean up the patch to make it suitable for checking in but the
chances of hitting the problem without the sleep in
MHD_handle_connection are very small.
Mike Crowe <mac@mcrowe.com>
To:
libmicrohttpd@gnu.org
Date:
Yesterday 16:48:20
I've looked at the fix in SVN. Unfortunately pthread_join returns an
error rather than setting errno. :( This caused me confusion recently
too.
Here's a patch that fixes this. It passed 'make check' modulo the curl
error 66 put failures that seem to happen for me regardless:
Thanks for libmicrohttpd! It's really useful for writing unit tests
for http clients and code interacting with http servers.
I mostly write code for Symbian, so I ported the library to Symbian
OS. You can see the patch at http://codereview.appspot.com/130056/show
. I'm not sure if you agree with how the changes have been structured,
but hopefully we can work towards a version that can be integrated.
Note that Symbian doesn't have autoconf and only a partial C library.
Best regards,
Mika Raento