Merge branch 'stable-2.14'

* stable-2.14:
  Allow setting Jetty HTTPD socket timeout

Change-Id: Ib8b38749997640dc21cef4f91a7d129dd579a1e9
This commit is contained in:
David Pursehouse
2017-05-11 11:36:57 +09:00
2 changed files with 16 additions and 0 deletions

View File

@@ -2538,6 +2538,21 @@ org.anyorg.MySecureIPFilter that performs source IP security filtering:
filterClass = org.anyorg.MySecureIPFilter
----
[[httpd.idleTimeout]]httpd.idleTimeout::
+
Maximum idle time for a connection, which roughly translates to the
TCP socket `SO_TIMEOUT`.
+
The max idle time is applied:
* When waiting for a new message to be received on a connection
* When waiting for a new message to be sent on a connection
+
This value is interpreted as the maximum time between some progress
being made on the connection. So if a single byte is read or written,
then the timeout is reset.
+
By default, 30 seconds.
[[httpd.robotsFile]]httpd.robotsFile::
+
Location of an external robots.txt file to be used instead of the one

View File

@@ -277,6 +277,7 @@ public class JettyServer {
}
c.setInheritChannel(cfg.getBoolean("httpd", "inheritChannel", false));
c.setReuseAddress(reuseAddress);
c.setIdleTimeout(cfg.getTimeUnit("httpd", null, "idleTimeout", 30000L, MILLISECONDS));
connectors[idx] = c;
}
return connectors;