/*
- * $Id: ICAPConfig.cc,v 1.16 2007/05/29 13:31:43 amosjeffries Exp $
+ * $Id: ICAPConfig.cc,v 1.17 2007/06/19 21:03:46 rousskov Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
classes.clean();
};
+
+time_t ICAPConfig::connect_timeout(bool bypassable) const
+{
+ if (connect_timeout_raw > 0)
+ return connect_timeout_raw; // explicitly configured
+
+ return bypassable ? Config.Timeout.peer_connect : Config.Timeout.connect;
+}
+
+time_t ICAPConfig::io_timeout(bool) const
+{
+ if (io_timeout_raw > 0)
+ return io_timeout_raw; // explicitly configured
+ // TODO: provide a different default for an ICAP transaction that
+ // can still be bypassed
+ return Config.Timeout.read;
+}
/*
- * $Id: ICAPConfig.h,v 1.13 2007/05/29 13:31:44 amosjeffries Exp $
+ * $Id: ICAPConfig.h,v 1.14 2007/06/19 21:03:46 rousskov Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
int onoff;
int preview_enable;
int preview_size;
+ time_t connect_timeout_raw;
+ time_t io_timeout_raw;
int default_options_ttl;
int send_client_ip;
int send_client_username;
~ICAPConfig();
+ time_t connect_timeout(bool bypassable) const;
+ time_t io_timeout(bool bypassable) const;
+
void parseICAPService(void);
void freeICAPService(void);
void dumpICAPService(StoreEntry *, const char *);
#
-# $Id: cf.data.pre,v 1.438 2007/05/26 06:38:03 wessels Exp $
+# $Id: cf.data.pre,v 1.439 2007/06/19 21:03:45 rousskov Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
If you want to enable the ICAP module support, set this to on.
DOC_END
+NAME: icap_connect_timeout
+TYPE: time_t
+DEFAULT: none
+LOC: TheICAPConfig.connect_timeout_raw
+IFDEF: ICAP_CLIENT
+DOC_START
+ This parameter specifies how long to wait for the TCP connect to
+ the requested ICAP server to complete before giving up and either
+ terminating the HTTP transaction or bypassing the failure.
+
+ The default for optional services is peer_connect_timeout.
+ The default for essential services is connect_timeout.
+ If this option is explicitly set, its value applies to all services.
+DOC_END
+
+NAME: icap_io_timeout
+COMMENT: time-units
+TYPE: time_t
+DEFAULT: none
+LOC: TheICAPConfig.io_timeout_raw
+IFDEF: ICAP_CLIENT
+DOC_START
+ This parameter specifies how long to wait for an I/O activity on
+ an established, active ICAP connection before giving up and
+ either terminating the HTTP transaction or bypassing the
+ failure.
+
+ The default is read_timeout.
+DOC_END
+
NAME: icap_service_failure_limit
TYPE: int
IFDEF: ICAP_CLIENT