netty5/example/src/main
Oleksii Kachaiev 902cdaae56 Carefully manage Keep-Alive connections in HttpStaticFileServer (#8914)
Motivation:

Simple rules:

* close the connection when sending any error
* specify "Connection: close" header when closing the connection
* successful responses should keep the connection intact when otherwise is not requested by the client

Modifications:

* "send response and cleanup the connection" logic moved to a helper
* for all successful responses set "Content-Lenght" header
* do not specify "Connection: Keep-Alive" header as far it's a default for HTTP/1.1
* set "Connection: close" header when necessary

Result:

Keep-Alive connections management is inlined with RFCs.
2019-03-06 15:52:32 +01:00
..
java/io/netty/example Carefully manage Keep-Alive connections in HttpStaticFileServer (#8914) 2019-03-06 15:52:32 +01:00
resources fix the typos 2017-04-20 04:56:09 +02:00