#include <filter_http_client.hpp>
Definition at line 28 of file filter_http_client.hpp.
◆ ~HTTPClient()
mp::filter::HTTPClient::~HTTPClient |
( |
| ) |
|
◆ HTTPClient()
mp::filter::HTTPClient::HTTPClient |
( |
| ) |
|
◆ configure()
void mp::filter::HTTPClient::configure |
( |
const xmlNode * |
ptr, |
|
|
bool |
test_only, |
|
|
const char * |
path |
|
) |
| |
Definition at line 168 of file filter_http_client.cpp.
171 for (ptr = ptr->children; ptr; ptr = ptr->next)
173 if (ptr->type != XML_ELEMENT_NODE)
175 else if (!strcmp((
const char *) ptr->name,
"proxy"))
177 m_p->proxy_host = mp::xml::get_text(ptr);
179 else if (!strcmp((
const char *) ptr->name,
"max-redirects"))
181 m_p->max_redirects = mp::xml::get_int(ptr, 0);
183 else if (!strcmp((
const char *) ptr->name,
"default-host"))
185 m_p->default_host = mp::xml::get_text(ptr);
186 if (
m_p->default_host.find(
"://") == std::string::npos)
188 throw mp::filter::FilterException
189 (
"default-host is missing method (such as http://)"
190 " in http_client filter");
193 else if (!strcmp((
const char *) ptr->name,
"x-forwarded-for"))
195 m_p->x_forwarded_for = mp::xml::get_bool(ptr, 0);
197 else if (!strcmp((
const char *) ptr->name,
"bind_host"))
199 m_p->bind_host = mp::xml::get_bool(ptr, 0);
203 throw mp::filter::FilterException
205 + std::string((
const char *) ptr->name)
206 +
" in http_client filter");
◆ process()
void mp::filter::HTTPClient::process |
( |
metaproxy_1::Package & |
package | ) |
const |
Definition at line 159 of file filter_http_client.cpp.
161 Z_GDU *gdu = package.request().get();
162 if (gdu && gdu->which == Z_GDU_HTTP_Request)
◆ m_p
boost::scoped_ptr<Rep> metaproxy_1::filter::HTTPClient::m_p |
|
private |
The documentation for this class was generated from the following files: