#include "filter_bounce.hpp"
#include <metaproxy/package.hpp>
#include <metaproxy/util.hpp>
#include "gduutil.hpp"
#include <yaz/zgdu.h>
#include <sstream>
Go to the source code of this file.
◆ filter_creator()
static mp::filter::Base* filter_creator |
( |
| ) |
|
|
static |
◆ http_echo()
static void http_echo |
( |
mp::odr & |
odr, |
|
|
Z_GDU * |
zgdu, |
|
|
Z_GDU * |
zgdu_res |
|
) |
| |
|
static |
Definition at line 58 of file filter_bounce.cpp.
61 ODR enc = odr_createmem(ODR_ENCODE);
63 (void) z_GDU(enc, &zgdu, 0, 0);
64 char *buf = odr_getbuf(enc, &len, 0);
66 Z_HTTP_Response *hres = zgdu_res->u.HTTP_Response;
69 z_HTTP_header_set(odr, &hres->headers,
70 "Content-Type",
"text/plain");
72 hres->content_buf = (
char*) odr_malloc(odr, len);
73 memcpy(hres->content_buf, buf, len);
74 hres->content_len = len;
Referenced by metaproxy_1::filter::Bounce::process().
◆ metaproxy_1_filter_bounce
struct metaproxy_1_filter_struct metaproxy_1_filter_bounce |