Kea 2.7.5
|
Represents HTTP header including a header name and value. More...
#include <http_header.h>
Public Member Functions | |
HttpHeader (const std::string &header_name, const std::string &header_value="") | |
Constructor. | |
std::string | getLowerCaseName () const |
Returns lower case header name. | |
std::string | getLowerCaseValue () const |
Returns lower case header value. | |
std::string | getName () const |
Returns header name. | |
uint64_t | getUint64Value () const |
Returns header value as unsigned integer. | |
std::string | getValue () const |
Returns header value. | |
bool | isValueEqual (const std::string &v) const |
Case insensitive comparison of header value. | |
Represents HTTP header including a header name and value.
It includes methods for retrieving header name and value in lower case and for case insensitive comparison of header values.
Definition at line 20 of file http_header.h.
|
explicit |
Constructor.
header_name | Header name. |
header_value | Header value. |
Definition at line 17 of file http_header.cc.
std::string isc::http::HttpHeader::getLowerCaseName | ( | ) | const |
Returns lower case header name.
Definition at line 34 of file http_header.cc.
References isc::util::str::lowercase().
std::string isc::http::HttpHeader::getLowerCaseValue | ( | ) | const |
Returns lower case header value.
Definition at line 41 of file http_header.cc.
References isc::util::str::lowercase().
Referenced by isValueEqual().
|
inline |
Returns header name.
Definition at line 31 of file http_header.h.
uint64_t isc::http::HttpHeader::getUint64Value | ( | ) | const |
Returns header value as unsigned integer.
BadValue | if the header value is not a valid number. |
Definition at line 23 of file http_header.cc.
References isc_throw.
|
inline |
Returns header value.
Definition at line 36 of file http_header.h.
bool isc::http::HttpHeader::isValueEqual | ( | const std::string & | v | ) | const |
Case insensitive comparison of header value.
v | Value to be compared. |
Definition at line 48 of file http_header.cc.
References getLowerCaseValue(), and isc::util::str::lowercase().