|
ACE_INet
6.1.2
|
#include <HeaderBase.h>


Public Member Functions | |
| HeaderBase () | |
| Constructor. | |
| virtual | ~HeaderBase () |
| Destructor. | |
| virtual void | set_content_length (int length) |
| virtual int | get_content_length () const |
| virtual void | set_content_type (const ACE_CString &mime_type) |
| virtual ACE_CString | get_content_type () const |
| void | clear () |
| virtual void | write (std::ostream &str) const |
| Writes the headers to the given stream. | |
| virtual bool | read (std::istream &str) |
| void | set (const ACE_CString &name, const ACE_CString &value) |
| Sets header <name> to . Overwrites existing vaues. | |
| void | add (const ACE_CString &name, const ACE_CString &value) |
| Adds header <name> with . Allows duplicates. | |
| void | remove (const ACE_CString &name) |
| Removes header <name> (first found). | |
| bool | get (const ACE_CString &name, ACE_CString &value) const |
| Retrieves value for header <name> into (first found). | |
| bool | has (const ACE_CString &name) const |
| Returns true if a header <name> exists (1 or more), false otherwise. | |
| void | get_values (const ACE_CString &name, ACE_Array< ACE_CString > &values) const |
| Retrieves values for all headers <name> into <values>. | |
Static Public Attributes | |
| static const int | UNKNOWN_CONTENT_LENGTH = -1 |
| static const ACE_CString | UNKNOWN_CONTENT_TYPE |
| static const ACE_CString | CONTENT_LENGTH = "Content-Length" |
| static const ACE_CString | CONTENT_TYPE = "Content-Type" |
| static const ACE_CString | EMPTY |
Protected Member Functions | |
| int | read_field (std::istream &str, ACE_CString &var, size_t maxlen, char delim) |
| int | read_ws_field (std::istream &str, ACE_CString &var, size_t maxlen) |
Static Protected Attributes | |
| static const int | eof_ = std::char_traits<char>::eof() |
Private Types | |
| enum | Limits { MAX_NAME_LENGTH = 256, MAX_VALUE_LENGTH = 4096 } |
| Limits for reading a header. More... | |
Private Attributes | |
| TNVMap | header_values_ |
|
private |
Limits for reading a header.
Reimplemented in ACE::HTTP::Request, and ACE::HTTP::Response.
Constructor.
|
virtual |
Destructor.
|
inline |
Adds header <name> with . Allows duplicates.
|
inline |
|
inline |
Retrieves value for header <name> into (first found).
|
inlinevirtual |
Returns the content length for this message. Returns UNKNOWN_CONTENT_LENGTH if no Content-Length header is present.
|
inlinevirtual |
Returns the content type for this message. Returns UNKNOWN_CONTENT_TYPE if no Content-Type header is present.
| void ACE::INet::HeaderBase::get_values | ( | const ACE_CString & | name, |
| ACE_Array< ACE_CString > & | values | ||
| ) | const |
Retrieves values for all headers <name> into <values>.
|
inline |
Returns true if a header <name> exists (1 or more), false otherwise.
|
virtual |
Reads the headers from the given stream.
Reimplemented in ACE::HTTP::Request, and ACE::HTTP::Response.
|
inlineprotected |
|
inlineprotected |
|
inline |
Removes header <name> (first found).
| void ACE::INet::HeaderBase::set | ( | const ACE_CString & | name, |
| const ACE_CString & | value | ||
| ) |
Sets header <name> to . Overwrites existing vaues.
|
virtual |
Sets the Content-Length header. Removes the Content-Length header if length is UNKNOWN_CONTENT_LENGTH.
|
inlinevirtual |
Sets the content type for this message. Removes the Content-Type header if UNKNOWN_CONTENT_TYPE is specified.
|
virtual |
Writes the headers to the given stream.
Reimplemented in ACE::HTTP::Request, and ACE::HTTP::Response.
|
static |
|
static |
|
static |
|
staticprotected |
|
static |
|
static |
1.8.0-20120409