It appears that the `Connection: close` header is stripped from the HTTP
response when using the AppletHTTP Lua class.  Is there a way add this
response header using this applet?

Example Lua:

-- send a synthetic http response
function send_http_response(applet)
  local content = 'Missing Connection: close header...';
  applet:set_status(200);
  applet:add_header('Content-Length', string.len(content));
  applet:add_header('Content-Type', 'text/plain');
  applet:add_header('Connection', 'close');
  applet:start_response();
  applet:send(content);
end

-- register service
core.register_service('healthcheck', 'http', send_http_response)

Curling returns the following results:

HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 35

Missing Connection: close header...

Thanks,

Phil

Reply via email to