[Top][All Lists]

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

Re: [libmicrohttpd] issue with suspend/resume

From: José Bollo
Subject: Re: [libmicrohttpd] issue with suspend/resume
Date: Wed, 10 May 2017 09:31:22 +0200

On Fri, 5 May 2017 21:09:21 +0300
Evgeny Grin <address@hidden> wrote:

> Hi José,
> Shouldn't be any change.
> Could you provide minimal example?

Hi Evgeny,

I was busy yesterday but I now have an example showing the regression.
I send it attached. I tested it against current master version
(917342b3fb0547523f2b4c6e607bb2ffd9cacdfd) and against version 0.9.49
(aka The former doesn't work, the later

How to test:

  gcc -o tmhd tmhd.c -lmicrohttpd && ./tmhd
  LD_PRELOAD=somewhere/  ./tmhd


  curl -i localhost:7878/index

What is bad? No reply is sent in the bad case, "curl" command doesn't
return. In the good case, it returns immediately as:

  > curl -i localhost:7878/index
  HTTP/1.1 403 Forbidden
  Connection: Keep-Alive
  Content-Length: 0
  Date: Wed, 10 May 2017 07:29:11 GMT

To circumvent it, you can replace #if 0 with #if 1, leading to call
MHD_run one more time. So there is a workaround.

My feeling is that this is a typical use case and it should work with
only one call to MHD_run. I also think that providing a way to resume a
connection and sending the pending data without having to call MHD_run
would help (but is not required).

Best regards

Attachment: tmhd.c
Description: Text Data

reply via email to

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