X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fex_filter_frontend_net.cpp;h=fbe608bacee037ccf2a9e63d7c762c0faa8097e8;hb=93d4dd6d4f9698c7aaa74cadb343a2da8ef8ff5a;hp=cace494ec9a433f393c26efe7d87b99bdc73fe84;hpb=e9420d437bd61c8683058af046a8dd90c859b6bc;p=metaproxy-moved-to-github.git diff --git a/src/ex_filter_frontend_net.cpp b/src/ex_filter_frontend_net.cpp index cace494..fbe608b 100644 --- a/src/ex_filter_frontend_net.cpp +++ b/src/ex_filter_frontend_net.cpp @@ -1,4 +1,4 @@ -/* $Id: ex_filter_frontend_net.cpp,v 1.13 2005-10-26 10:55:26 marc Exp $ +/* $Id: ex_filter_frontend_net.cpp,v 1.16 2005-10-30 17:13:36 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -13,6 +13,7 @@ namespace po = boost::program_options; #include "config.hpp" +#include "util.hpp" #include "filter_frontend_net.hpp" #include "filter_z3950_client.hpp" #include "filter_virt_db.hpp" @@ -33,7 +34,7 @@ public: Z_GDU *gdu = package.request().get(); if (gdu && gdu->which == Z_GDU_HTTP_Request) { - ODR odr = odr_createmem(ODR_ENCODE); + yp2::odr odr; Z_GDU *gdu = z_get_HTTP_Response(odr, 200); Z_HTTP_Response *http_res = gdu->u.HTTP_Response; @@ -45,10 +46,12 @@ public: http_res->content_len = strlen(http_res->content_buf); package.response() = gdu; - odr_destroy(odr); } return package.move(); }; + const std::string type() const { + return "HTTPFilter"; + }; }; int main(int argc, char **argv) @@ -103,7 +106,7 @@ int main(int argc, char **argv) // put Virt db filter in router yp2::filter::Virt_db filter_virt_db; filter_virt_db.add_map_db2vhost("Default", "indexdata.dk/gils"); - filter_virt_db.add_map_db2vhost("Local", "localhost:9999/Default"); + filter_virt_db.add_map_db2vhost("Local", "localhost:9100/Default"); router.append(filter_virt_db);