View Issue Details

IDProjectCategoryView StatusLast Update
0004667libmicrohttpdHTTP PUT/DELETEpublic2016-10-17 17:21
Reporterjoris Assigned ToChristian Grothoff Due Date
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 15:04

manager   ~0011135

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

joris

2016-09-26 06:03

reporter   ~0011150

Trace is attached

Christian Grothoff

2016-09-26 09: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 ModifiedUsernameFieldChange
2016-09-20 13:07jorisNew Issue
2016-09-22 14:33Christian GrothoffAssigned To => Christian Grothoff
2016-09-22 14:33Christian GrothoffStatusnew => assigned
2016-09-22 14:33Christian GrothoffProduct Version => 0.9.51
2016-09-22 14:33Christian GrothoffTarget Version => 0.9.52
2016-09-22 15:04Christian GrothoffNote Added: 0011135
2016-09-22 15:05Christian GrothoffStatusassigned => feedback
2016-09-26 06:02jorisFile Added: libmicrohttpd-delete-with-payload.pcapng
2016-09-26 06:03jorisNote Added: 0011150
2016-09-26 06:03jorisStatusfeedback => assigned
2016-09-26 09:45Christian GrothoffFile Added: working.pcapng
2016-09-26 09:48Christian GrothoffNote Added: 0011151
2016-09-26 09:49Christian GrothoffReproducibilityalways => unable to reproduce
2016-09-26 09:49Christian GrothoffStatusassigned => resolved
2016-09-26 09:49Christian GrothoffResolutionopen => no change required
2016-09-26 09:49Christian GrothoffFixed in Version => 0.9.52
2016-10-17 17:21Christian GrothoffStatusresolved => closed