logstash-input-http icon indicating copy to clipboard operation
logstash-input-http copied to clipboard

Make keepalive setting conditional

Open gagara opened this issue 5 years ago • 0 comments

Keepalive option at https://github.com/logstash-plugins/logstash-input-http/blob/master/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java#L57 should not be hardcoded, but it must respect "Connection" header. If in plugin configuration user provides custom response header as

response_headers => {"Connection" => "close"}

then in according to https://tools.ietf.org/html/rfc7230#section-6.6 server must close connection

A server that sends a "close" connection option MUST initiate a close of the connection (see below) after it sends the response containing "close". The server MUST NOT process any further requests received on that connection.

gagara avatar Feb 02 '19 19:02 gagara