Squid Web Cache
master
Loading...
Searching...
No Matches
Config.cc
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#include "
squid.h
"
10
#include "
adaptation/icap/Config.h
"
11
#include "
adaptation/icap/ServiceRep.h
"
12
#include "
ConfigParser.h
"
13
#include "
HttpReply.h
"
14
#include "
HttpRequest.h
"
15
#include "
SquidConfig.h
"
16
#include "
Store.h
"
17
#include "
wordlist.h
"
18
19
Adaptation::Icap::Config
Adaptation::Icap::TheConfig
;
20
21
Adaptation::Icap::Config::Config
() :
22
default_options_ttl(0),
23
preview_enable(0), preview_size(0), allow206_enable(0),
24
connect_timeout_raw(0), io_timeout_raw(0), reuse_connections(0),
25
client_username_header(nullptr), client_username_encode(0), repeat(nullptr),
26
repeat_limit(0)
27
{
28
}
29
30
Adaptation::Icap::Config::~Config
()
31
{
32
// no need to free client_username_header, it's done in cf_parser.cci:free_all
33
}
34
35
Adaptation::ServicePointer
36
Adaptation::Icap::Config::createService
(
const
ServiceConfigPointer
&cfg)
37
{
38
return
new
Adaptation::Icap::ServiceRep
(cfg);
39
}
40
41
time_t
Adaptation::Icap::Config::connect_timeout
(
bool
bypassable)
const
42
{
43
if
(connect_timeout_raw > 0)
44
return
connect_timeout_raw;
// explicitly configured
45
46
return
bypassable ? ::Config.Timeout.peer_connect : ::Config.Timeout.connect;
47
}
48
49
time_t
Adaptation::Icap::Config::io_timeout
(
bool
)
const
50
{
51
if
(io_timeout_raw > 0)
52
return
io_timeout_raw;
// explicitly configured
53
// TODO: provide a different default for an ICAP transaction that
54
// can still be bypassed
55
return ::Config.Timeout.read;
56
}
57
ConfigParser.h
HttpReply.h
HttpRequest.h
SquidConfig.h
Store.h
Config.h
Adaptation::Icap::Config
Definition
Config.h:26
Adaptation::Icap::Config::createService
Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg) override
Definition
Config.cc:36
Adaptation::Icap::Config::io_timeout
time_t io_timeout(bool bypassable) const
Definition
Config.cc:49
Adaptation::Icap::Config::Config
Config()
Definition
Config.cc:21
Adaptation::Icap::Config::connect_timeout
time_t connect_timeout(bool bypassable) const
Definition
Config.cc:41
Adaptation::Icap::Config::~Config
~Config() override
Definition
Config.cc:30
Adaptation::Icap::ServiceRep
Definition
ServiceRep.h:61
RefCount< Service >
ServiceRep.h
Adaptation::Icap::TheConfig
Config TheConfig
Definition
Config.cc:19
squid.h
wordlist.h
squid
src
adaptation
icap
Config.cc
Generated by
1.9.8