blob: 2895ef048c6906cd59984ff57bbca89cf495df27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// -*- C++ -*-
//
// $Id$
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE
{
namespace HTTP
{
ACE_INLINE
void Header::set_version(const ACE_CString& version)
{
this->version_ = version;
}
ACE_INLINE
const ACE_CString& Header::get_version() const
{
return this->version_;
}
ACE_INLINE
void Header::set_chunked_transfer_encoding(bool flag)
{
if (flag)
{
this->set (TRANSFER_ENCODING, CHUNKED_TRANSFER_ENCODING);
}
else
{
this->remove (TRANSFER_ENCODING);
}
}
ACE_INLINE
bool Header::has_chunked_transfer_encoding() const
{
ACE_CString val;
return this->get (TRANSFER_ENCODING, val) &&
(val == CHUNKED_TRANSFER_ENCODING);
}
ACE_INLINE
void Header::set_keep_alive(bool keep_alive)
{
this->set (CONNECTION, keep_alive ?
CONNECTION_KEEP_ALIVE :
CONNECTION_CLOSE);
}
ACE_INLINE
bool Header::has_keep_alive() const
{
ACE_CString val;
return this->get (CONNECTION, val) &&
(val == CONNECTION_KEEP_ALIVE);
}
}
}
ACE_END_VERSIONED_NAMESPACE_DECL
|