Hi Daniel, Could you try MHD with the attached patch to see if this works? (I've not tested it, but just wanted to quickly see it this could be done in a few lines).
Happy hacking! Christian On 12/01/2016 07:28 PM, Daniel Tweed, Mr wrote: > I'm sorry if it's rude to ask, but have you ever seen a library which > implements the functions required for this status code? I chose > libmicrohttpd almost solely based on the fact that I thought this > function would be available, given the defines, whereas the others I had > looked at (libhttpd, lievhtp libonion, etc) did not define the code at all. > > > Best, > > Daniel
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index e6a26ef..23fde22 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3111,6 +3111,15 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
/* no default action */
break;
case MHD_CONNECTION_FOOTERS_SENT:
+ if (MHD_HTTP_PROCESSING == connection->response->status_code)
+ {
+ /* After this type of response, we allow sending another! */
+ connection->state = MHD_CONNECTION_HEADERS_PROCESSED;
+ MHD_destroy_response (connection->response);
+ connection->response = NULL;
+ /* FIXME: maybe partially reset memory pool? */
+ continue;
+ }
if (MHD_NO != socket_flush_possible (connection))
socket_start_no_buffering_flush (connection);
else
signature.asc
Description: OpenPGP digital signature
