bitz-server
0.1.6
|
Classes | |
struct | encapsulated_header_compare |
Public Member Functions | |
const headers_t & | headers () const throw () |
const std::string | value (const std::string &key) throw () |
const int | encapsulated_header (const std::string &entity) throw () |
virtual void | attach (std::string key, std::string value) throw () |
virtual bool | attach_encapsulated (std::string header_value) throw () |
virtual void | update_encapsulated (const payload_t &payload) throw () |
virtual bool | remove (std::string key) throw () |
virtual const std::string | encapsulated_header_str () throw () |
virtual std::vector< encapsulated_header_data_t > | sort_encapsulated_header () |
Protected Attributes | |
headers_t | _headers |
encapsulated_header_t | _encapsulated |
|
virtual |
Attach header data into the header
e.g. Host: icap-server.net Encapsulated: req-hdr=0, null-body=170 [key]: [value]
key | header key |
value | header value |
|
virtual |
Attach Encapsulated header data. This method should only be used when reading a raw request / response. Consider using update_encapsulated() method for other scenarios.
e.g. Encapsulated: req-hdr=0, req-body=412 Encapsulated: req-hdr=0, res-hdr=822, res-body=1655 Encapsulated: [header_value]
header_value | Encapsulated header value |
const int icap::Header::encapsulated_header | ( | const std::string & | entity | ) | |
throw | ( | ||||
) |
Return Encapsulated header value for the given entity or -1 if the given entity is invalid.
entity | encapsulated header entity |
|
virtual |
Return Encapsulated header as a std::string value.
const Header::headers_t & icap::Header::headers | ( | ) | const | |
throw | ( | |||
) |
Return headers
|
virtual |
Remove header data from the header instance with the given key
key | header key |
|
virtual |
Sort the encapsulated header data and return a std::vector of encapsulated_header_data_t. The actual header data won't be changed.
|
virtual |
Update Encapsulated header data using the passed in (icap::payload_t) payload. When the request / response has been populated with the payload, calling this method will update the encapsulated header entities with appropriate values.
This methos will always succeed.
payload | request or response payload |
const std::string icap::Header::value | ( | const std::string & | key | ) | |
throw | ( | ||||
) |
Returns the header value for the given header key or an empty string if the header is not found.
key | header key |