#include <HTTP_Header.h>


Public Member Functions | |
| Header () | |
| Constructor. | |
| Header (const ACE_CString &version) | |
| Constructor. | |
| virtual | ~Header () |
| Destructor. | |
| void | set_version (const ACE_CString &version) |
| Sets the HTTP version to use. | |
| const ACE_CString & | get_version () const |
| Returns the HTTP version. | |
| void | set_chunked_transfer_encoding (bool flag) |
| bool | has_chunked_transfer_encoding () const |
| void | set_keep_alive (bool keep_alive) |
| bool | has_keep_alive () const |
Static Public Attributes | |
| static const ACE_CString | HTTP_1_0 = "HTTP/1.0" |
| static const ACE_CString | HTTP_1_1 = "HTTP/1.1" |
| static const ACE_CString | CHUNKED_TRANSFER_ENCODING = "chunked" |
| static const ACE_CString | TRANSFER_ENCODING = "Transfer-Encoding" |
| static const ACE_CString | CONNECTION = "Connection" |
| static const ACE_CString | CONNECTION_KEEP_ALIVE = "Keep-Alive" |
| static const ACE_CString | CONNECTION_CLOSE = "Close" |
Private Attributes | |
| ACE_CString | version_ |
Definition at line 35 of file HTTP_Header.h.
| ACE::HTTP::Header::Header | ( | ) |
Constructor.
Definition at line 28 of file HTTP_Header.cpp.
: ACE::INet::HeaderBase (), version_ (HTTP_1_0) { }
| ACE::HTTP::Header::Header | ( | const ACE_CString & | version | ) |
Constructor.
Definition at line 34 of file HTTP_Header.cpp.
: ACE::INet::HeaderBase (), version_ (version) { }
| ACE::HTTP::Header::~Header | ( | ) | [virtual] |
| const ACE_CString & ACE::HTTP::Header::get_version | ( | ) | const [inline] |
| bool ACE::HTTP::Header::has_chunked_transfer_encoding | ( | ) | const [inline] |
Returns true if the Transfer-Encoding header is set and its value is CHUNKED_TRANSFER_ENCODING.
Definition at line 38 of file HTTP_Header.inl.
{
ACE_CString val;
return this->get (TRANSFER_ENCODING, val) &&
(val == CHUNKED_TRANSFER_ENCODING);
}
| bool ACE::HTTP::Header::has_keep_alive | ( | ) | const [inline] |
Returns true if the message has a Connection header field and its value is "Keep-Alive" the message is a HTTP/1.1 message and no Connection header is set Returns false otherwise.
Definition at line 54 of file HTTP_Header.inl.
{
ACE_CString val;
return this->get (CONNECTION, val) &&
(val == CONNECTION_KEEP_ALIVE);
}
| void ACE::HTTP::Header::set_chunked_transfer_encoding | ( | bool | flag | ) | [inline] |
If flag is true, sets the Transfer-Encoding header to CHUNKED_TRANSFER_ENCODING. Otherwise, removes the Transfer-Encoding header.
Definition at line 25 of file HTTP_Header.inl.
{
if (flag)
{
this->set (TRANSFER_ENCODING, CHUNKED_TRANSFER_ENCODING);
}
else
{
this->remove (TRANSFER_ENCODING);
}
}
| void ACE::HTTP::Header::set_keep_alive | ( | bool | keep_alive | ) | [inline] |
Sets the value of the Connection header field. The value is set to "Keep-Alive" if true specified, or to "Close" otherwise.
Definition at line 46 of file HTTP_Header.inl.
{
this->set (CONNECTION, keep_alive ?
CONNECTION_KEEP_ALIVE :
CONNECTION_CLOSE);
}
| void ACE::HTTP::Header::set_version | ( | const ACE_CString & | version | ) | [inline] |
Sets the HTTP version to use.
Definition at line 13 of file HTTP_Header.inl.
{
this->version_ = version;
}
const ACE_CString ACE::HTTP::Header::CHUNKED_TRANSFER_ENCODING = "chunked" [static] |
Definition at line 77 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::CONNECTION = "Connection" [static] |
Definition at line 80 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::CONNECTION_CLOSE = "Close" [static] |
Definition at line 83 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::CONNECTION_KEEP_ALIVE = "Keep-Alive" [static] |
Definition at line 82 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::HTTP_1_0 = "HTTP/1.0" [static] |
Definition at line 74 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::HTTP_1_1 = "HTTP/1.1" [static] |
Definition at line 75 of file HTTP_Header.h.
const ACE_CString ACE::HTTP::Header::TRANSFER_ENCODING = "Transfer-Encoding" [static] |
Definition at line 79 of file HTTP_Header.h.
ACE_CString ACE::HTTP::Header::version_ [private] |
Definition at line 86 of file HTTP_Header.h.
1.7.0