Hello,
Sometimes we need to disable the keep-alive header. For example, see this headers sent from the Express framework:
X-Powered-By: Express
Date: Fri, 22 Jan 2016 02:59:01 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 53
ETag: W/"35-gbcWXekTybZhSQkHA12aAA"
Wel, just for a test, I tried to disable it on MHD, but it doesn't worked. I tried with MHD_del_response_header(response, MHD_HTTP_HEADER_CONNECTION, "Keep-Alive") and MHD_del_response_header(response, MHD_HTTP_HEADER_CONNECTION, NULL), same problem with both, the connection keep-alive header persists.
So, is the connection keep-alive header sent unconditionally by MHD? If so, it should be configured via flags, so the user (programmer) could populate all headers from a own list instead of removing it from an already populated list by the library, avoiding another loop (eg: MHD_del_response_header), increasing performance in the end code.