libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Hanging connections


From: Phil Rosenberg
Subject: [libmicrohttpd] Hanging connections
Date: Tue, 3 Nov 2015 01:18:46 +0000

Hi
I have just started using microhttpd to provide web access to control
some software I have written. However I've just hit a problem. I'm not
a http expert, so please bear with me.

I have set up MHD to respond to get and post requests. For both cases
I return a html form to the client with some text boxes and a submit
button. The form is followed by the time, so I can check that the page
has updated. For a post request I parse the keys to extract the
information I need to control my application. I'm using one thread per
connection. My code was initially based on the minimal example on the
web page, I then added the POST processing code following the
tutorial.

I am using version 0.9.45 built on Windows 10 using Visual Studio 2015
Community Edition.

Unfortunately about 50% of the time when I press the submit button in
the browser I get a loading symbol in the tab, but nothing happens.
Pressing the submit button again usually seems to get things working,
but sometimes it takes quite a few button presses.

Running in the debugger I can see that for these hung connections my
first callback is not being called. I think the port is still open or
something, because exiting my application causes the browser to
immediately display a cannot connect message. It's like MHD is stuck
in a loop internally or something.

I've tried connecting with IE and Edge from the local machine and from
Firefox from an Ubuntu machine on the same LAN. All give similar
symptoms.

One possibly relevant item - I get similar hangs if I reply MHD_NO to
any of the callbacks, which I thought was supposed to sever the
connection.

As I said I'm not an expert on HTTP, and I've only just picked up MHD,
so any debugging advice would be most welcome. I'm happy to do the
legwork, but I'm struggling to know where to start.

Thanks in advance for any help

Phil



reply via email to

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