View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002983 | libmicrohttpd | external API | public | 2013-08-10 11:44 | 2013-08-23 14:33 |
Reporter | bplant | Assigned To | Christian Grothoff | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.27 | ||||
Target Version | 0.9.29 | Fixed in Version | 0.9.29 | ||
Summary | 0002983: Connections added with MHD_add_connection aren't immediately processed | ||||
Description | I'm using MHD as a traditional web server with MHD_USE_SELECT_INTERNALLY. In addition to this, I'm also using MHD_add_connection to feed "reverse connections" to the daemon. These are connections that I've created to an external host (to get through NAT) and the external host then sends the HTTP request back down the opened connection. When I pass a connection to the daemon using MHD_add_connection, it isn't processed until I perform a normal HTTP request on the daemon's main socket (i.e. port 80). If I run wget/curl in a while loop from a terminal I can keep passing connections to MHD_add_connection and they'll be processed. I'm reading a few non-HTTP characters from the start of the data stream that the remote host sends through this reverse connection, but I'm not reading any of the HTTP data/headers. I've verified that select is returning > 0 on the socket, so I would have thought MHD would still pick it up ok. | ||||
Tags | No tags attached. | ||||
|
Yes, clearly an issue, I'll look into it. |
|
Ok, proposed fix is in SVN 28487. This adds the requirement that if you use external select/poll AND MHD_add_connection, you must also pass MHD_USE_PIPE_FOR_SHUTDOWN, as that's the only good way we have to signal select in this context. Please let me know if this fixes your problem. |
|
I tried to give it a go, but svn isn't compiling. I suspect the cleanup goto tag on line 1315 of daemon.c is meant to be outside the #if HTTPS_SUPPORT || EPOLL_SUPPORT? Same goes for the return MHD_NO at the end of the function. I tried moving these, but now I get "Internal application error, closing connection." all the time.x |
|
Yes, that compilation error should be fixed now. When do you get the internal application error exactly? |
|
Odd, a make clean fixed the issue. Seems to be working correctly :) |
|
Ok, so this one is resolved once documented? |
|
Documented in SVN 28550. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-08-10 11:44 | bplant | New Issue | |
2013-08-10 20:46 | Christian Grothoff | Note Added: 0007329 | |
2013-08-10 20:46 | Christian Grothoff | Assigned To | => Christian Grothoff |
2013-08-10 20:46 | Christian Grothoff | Status | new => assigned |
2013-08-10 20:47 | Christian Grothoff | Priority | normal => high |
2013-08-10 20:47 | Christian Grothoff | Target Version | => 0.9.29 |
2013-08-10 21:04 | Christian Grothoff | Note Added: 0007330 | |
2013-08-11 10:24 | Christian Grothoff | Status | assigned => feedback |
2013-08-11 11:58 | bplant | Note Added: 0007331 | |
2013-08-11 11:58 | bplant | Status | feedback => assigned |
2013-08-11 15:00 | Christian Grothoff | Note Added: 0007332 | |
2013-08-11 23:22 | bplant | Note Added: 0007336 | |
2013-08-12 15:58 | Christian Grothoff | Note Added: 0007354 | |
2013-08-12 23:56 | Christian Grothoff | Note Added: 0007360 | |
2013-08-12 23:57 | Christian Grothoff | Status | assigned => resolved |
2013-08-12 23:57 | Christian Grothoff | Fixed in Version | => 0.9.29 |
2013-08-12 23:57 | Christian Grothoff | Resolution | open => fixed |
2013-08-23 14:33 | Christian Grothoff | Status | resolved => closed |
2024-01-21 13:24 | Christian Grothoff | Category | libmicrohttpd API => external API |