View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002783 | libmicrohttpd | HTTP GET/HEAD | public | 2013-02-08 03:10 | 2021-09-02 17:54 |
Reporter | klx.login | Assigned To | Christian Grothoff | ||
Priority | high | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | i386 | OS | ubuntu | OS Version | 10.04 |
Product Version | 0.9.24 | ||||
Target Version | 0.9.25 | Fixed in Version | 0.9.25 | ||
Summary | 0002783: when create a no body MHD_Response, and response by https, goes into an infinite loop | ||||
Description | when create a no body MHD_Response, and response by https, goes into an infinite loop | ||||
Steps To Reproduce | 1.Start libmicrohttpd HTTPS, like struct MHD_OptionItem options[] = { { MHD_OPTION_HTTPS_MEM_KEY, 0, key }, { MHD_OPTION_HTTPS_MEM_CERT, 0, cert }, { MHD_OPTION_HTTPS_MEM_TRUST, 0, cacert }, { MHD_OPTION_END, 0, NULL }, }; daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL, 12345, NULL, NULL, ahc, &s_httpd, MHD_OPTION_ARRAY, options, MHD_OPTION_END); 2.when a connection come, response it like response = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); if(response == NULL) { return -1; } ret = MHD_queue_response (connection, errcode, response); MHD_destroy_response (response); 3. CPU utilization becomes 100%. | ||||
Additional Information | 1. In libmicrohttpd's src/daemon/connection.c, MHD_connection_handle_write() is always invoked, and connection->state is always MHD_CONNECTION_NORMAL_BODY_READY(12). 2. This bug is not exists without https. | ||||
Tags | No tags attached. | ||||
|
I've added a testcase for this in SVN 26293 (test_empty_response.c). However, the test passes nicely on my system. Now, you reported the bug against 0.9.24, and there was a bugfix with respect to a response size of zero on January 6th (just after 0.9.24, part of 0.9.25) which might have addressed this issue already. Could you please run the test and try it with SVN HEAD and/or 0.9.25 to see if the bug was already fixed? |
|
Fix committed to master branch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-08 03:10 | klx.login | New Issue | |
2013-03-04 13:48 | Christian Grothoff | Assigned To | => Christian Grothoff |
2013-03-04 13:48 | Christian Grothoff | Status | new => assigned |
2013-03-04 13:48 | Christian Grothoff | Target Version | => 0.9.26 |
2013-03-04 14:44 | Christian Grothoff | Note Added: 0006927 | |
2013-03-04 14:44 | Christian Grothoff | Status | assigned => feedback |
2013-03-05 03:06 | klx.login | Status | feedback => assigned |
2013-03-05 05:50 | Christian Grothoff | Status | assigned => resolved |
2013-03-05 05:50 | Christian Grothoff | Fixed in Version | => 0.9.25 |
2013-03-05 05:50 | Christian Grothoff | Resolution | open => fixed |
2013-03-05 05:50 | Christian Grothoff | Status | resolved => closed |
2013-03-05 05:50 | Christian Grothoff | Target Version | 0.9.26 => 0.9.25 |
2013-05-06 12:54 | Christian Grothoff | Category | HTTP GET => HTTP GET/HEAD |
2021-09-02 17:54 | Christian Grothoff | Changeset attached | => libmicrohttpd master dab82f19 |
2021-09-02 17:54 | Christian Grothoff | Note Added: 0018212 |