From 228879bfc4eda8bac1919bab176c859c64ac54c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 31 Dec 2018 18:01:19 +0100 Subject: Disable keepalive by default for HTTP/1.1 This is safer as servers may reject too many extra empty lines. --- doc/src/manual/gun.asciidoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc index 1b4e6d7..dff927c 100644 --- a/doc/src/manual/gun.asciidoc +++ b/doc/src/manual/gun.asciidoc @@ -154,13 +154,14 @@ The default value is given next to the option name: // @todo Document content_handlers and gun_sse_h. -keepalive (5000):: +keepalive (infinity):: Time between pings in milliseconds. Since the HTTP protocol has no standardized way to ping the server, Gun will simply send an empty line when the connection is idle. Gun only makes a best effort here as servers usually have configurable limits to drop -idle connections. Use `infinity` to disable. +idle connections. Disabled by default due to potential +incompatibilities. transform_header_name - see below:: @@ -315,6 +316,8 @@ undocumented and must be set to `gun_ws_h`. == Changelog * *2.0*: Function `gun:headers/4,5` introduced. +* *2.0*: The `keepalive` option is now set to `infinity` by + default for the HTTP/1.1 protocol, disabling it. * *1.3*: Add the CONNECT destination's `protocols` option and deprecate the previously introduced `protocol` option. * *1.2*: Introduce the type `connect_destination()`. -- cgit v1.2.3