View Issue Details

IDProjectCategoryView StatusLast Update
0004667libmicrohttpdHTTP PUT/DELETEpublic2016-10-17 19:21
Reporterjoris Assigned ToChristian Grothoff  
PrioritynormalSeveritymajorReproducibilityunable to reproduce
Status closedResolutionno change required 
PlatformlinuxOSDebian OS VersionWheezy
Product Version0.9.51 
Target Version0.9.52Fixed in Version0.9.52 
Summary0004667: libmicrohttpd does not answer to DELETE requests with a payload
DescriptionWe are using libhttpserver, which uses libmicrohttpd. When we send a DELETE request with a payload to the server, the server does not send back an answer, it just closes the connection after 30 seconds or so (which is probably just a timeout). DELETE requests without payloads are OK.

I debugged this through our code and libhttpserver code, both generate a response. libhttpserver calls MHD_enqueue_response, which returns with MHD_YES.

The version we use version 0.9.42, but I have also tried it with latest from SVN, same result.
Steps To ReproduceUse http client to perform a delete request with a payload
TagsNo tags attached.
Attached Files
working.pcapng (4,032 bytes)

Activities

Christian Grothoff

2016-09-22 17:04

manager   ~0011135

Could you provide me with a wireshark transcript of the interaction?

joris

2016-09-26 08:03

reporter   ~0011150

Trace is attached

Christian Grothoff

2016-09-26 11:48

manager   ~0011151

I wrote a testcase (SVN 38015) to reproduce this, and it's not a problem (wireshark trace of my test run attached). Note that in SVN 38016 I'm turning on running the test with different thread modes, so you'd not get the same trace with that revision.

Now, while writing the test, I first encountered a similar issue, when I wrote "delete" instead of "DELETE" and had "strcmp" instead of "strcasecmp". In that case, I also don't get a reply...

So I suspect you should carefully check your application code to see if you ever return "MHD_NO" from the main callback. In any case, the test does show that MHD does handle DELETE with upload data attached just fine.

Issue History

Date Modified Username Field Change
2016-09-20 15:07 joris New Issue
2016-09-22 16:33 Christian Grothoff Assigned To => Christian Grothoff
2016-09-22 16:33 Christian Grothoff Status new => assigned
2016-09-22 16:33 Christian Grothoff Product Version => 0.9.51
2016-09-22 16:33 Christian Grothoff Target Version => 0.9.52
2016-09-22 17:04 Christian Grothoff Note Added: 0011135
2016-09-22 17:05 Christian Grothoff Status assigned => feedback
2016-09-26 08:02 joris File Added: libmicrohttpd-delete-with-payload.pcapng
2016-09-26 08:03 joris Note Added: 0011150
2016-09-26 08:03 joris Status feedback => assigned
2016-09-26 11:45 Christian Grothoff File Added: working.pcapng
2016-09-26 11:48 Christian Grothoff Note Added: 0011151
2016-09-26 11:49 Christian Grothoff Reproducibility always => unable to reproduce
2016-09-26 11:49 Christian Grothoff Status assigned => resolved
2016-09-26 11:49 Christian Grothoff Resolution open => no change required
2016-09-26 11:49 Christian Grothoff Fixed in Version => 0.9.52
2016-10-17 19:21 Christian Grothoff Status resolved => closed