DEBIAN_DIST="wheezy squeeze"
UBUNTU_DIST="quantal precise oneiric natty lucid"
CENTOS_DIST="centos5 centos6"
-VERSION=1.3.55
+VERSION=1.3.56
+--- 1.3.56 2013/05/27
+
+New filter present_chunk. This filter allows splitting of present requests into smaller chunks.
+
+New filter sd_remove, which replaces surrogate diagnostics with
+SUTRS records. This filter tries to deal with clients that breaks
+when receiving surrogate diagnostics.
+
+new filter http_client. Same role as z3950_client, but just for
+HTTP. Allows Metaproxy to operate as a HTTP proxy.
+
+New filter http_rewrite1, which serves as purpose on how to rewrite
+HTTP content with Metaproxy.
+
+Use libboost-system if available, because newer versions of libboost-threads
+requires libboost-system.
+
+Allow frontend_net to serve SSL/HTTPS, because we can specify a server
+certificate now.
+
--- 1.3.55 2013/04/10
zoom: Torus setting: authenticationMode which may hold values "basic"
)
YAZ_DOC
-ID_BOOST([thread test regex],[1.33])
+ID_BOOST([system thread test regex],[1.33])
if test -z "${BOOST_THREAD_LIB}"; then
AC_MSG_ERROR([Boost thread development libraries required])
fi
+metaproxy (1.3.56-1indexdata) unstable; urgency=low
+
+ * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk> Mon, 27 May 2013 13:14:23 +0200
+
metaproxy (1.3.55-1indexdata) unstable; urgency=low
* Upstream.
<refsect1><title>DESCRIPTION</title>
<para>
- This module implements HTTP client functionality. By default,
- if proxy element is not given, it should be used as an explicit
- proxy (non-transparent mode). If proxy element is set, requests
- will be relayed to the proxy given (transparent mode for HTTP clients
- accessing this module).
+ This module implements HTTP client functionality. Filter rontend_net
+ + http_client in combo - acts as a normal, non-transparent, proxy.
+ </para>
+ <para>
+ The element default-host of configuration specifies the default host
+ in remote URL. If this is set, frontend_net + http_client acts as a
+ transparent HTTP proxy as well.
+ </para>
+ <para>
+ The configuration element, proxy, is optional and enables a remote
+ HTTP proxy to be in use.
</para>
</refsect1>
A typical configuration looks like this:
<screen><![CDATA[
<filter type="http_client">
- <proxy>localhost:9999</proxy>
+ <proxy>localhost:3128</proxy>
</filter>
]]>
</screen>
$(srcdir)/config-cgi.xml \
$(srcdir)/config-solr.xml \
$(srcdir)/config-zoom.xml \
+ $(srcdir)/config-proxy.xml \
$(srcdir)/retrieval-info.xml
config = example.simple-auth example.target-auth pqf2pqf.xsl explain.xml \
+++ /dev/null
-<?xml version="1.0"?>
-<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
- <start route="start"/>
- <!-- sample config which illustrates the use of http_file filter.. -->
- <filters>
- <filter id="frontend" type="frontend_net">
- <threads>20</threads>
- <port>@:9000</port>
- <message>FN</message>
- <stat-req>/fn_stat</stat-req>
- </filter>
- </filters>
- <routes>
- <route id="start">
- <filter refid="frontend"/>
- <filter type="http_file">
- <mimetypes>/etc/mime.types</mimetypes>
- <area>
- <documentroot>.</documentroot>
- <prefix>/etc</prefix>
- </area>
- </filter>
- <filter type="log"><category access="false" line="true" apdu="true" /></filter>
-<!--
- <filter type="http_rewrite1">
- <replace content-type="text/html" pattern="YAZ" replacement="yaz"/>
- </filter>
--->
- <filter type="http_client">
-<!--
- <proxy>localhost:9999</proxy>
--->
- </filter>
- <filter type="bounce"/>
- </route>
- </routes>
-</metaproxy>
-
--- /dev/null
+<?xml version="1.0"?>
+<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
+ <start route="start"/>
+ <!-- sample config which illustrates the use of http_file filter.. -->
+ <routes>
+ <route id="start">
+ <filter type="frontend_net">
+ <threads>10</threads>
+ <port>tcp:@:9000</port>
+ <port cert_fname="ztest.pem">ssl:@:9001</port>
+ </filter>
+ <filter type="log">
+ <message>M</message>
+ <category apdu="true"/>
+ </filter>
+ <filter type="http_client">
+ <!-- <default-host>https://localhost:9999</default-host> -->
+ <!-- <proxy>localhost:3128</proxy> -->
+ </filter>
+ </route>
+ </routes>
+</metaproxy>
+
<filter type="log">
<message>log</message>
</filter>
+ <filter type="sd_remove"/>
+ <filter type="present_chunk">
+ <chunk>2</chunk>
+ </filter>
<filter refid="backend"/>
<filter type="bounce"/>
</route>
CONFIG=../metaproxy-config
SO=metaproxy_filter_myfilter.so
-all: $(SO)
+all: $(SO) mytest
$(SO): filter_myfilter.cpp
- echo $(LIBS)
- $(CXX) -shared `$(CONFIG) --cflags` -fPIC -I ../src $< \
- -o $(SO) `$(CONFIG) --libs`
+ $(CXX) -shared `$(CONFIG) --cflags` -fPIC $< \
+ -o $@ `$(CONFIG) --libs`
+
+mytest: mytest.cpp
+ $(CXX) `$(CONFIG) --cflags` $< \
+ -o $@ `$(CONFIG) --libs`
clean:
- rm -f *.so
+ rm -f *.so mytest
run: all
../src/metaproxy -c config.xml
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include <yaz/log.h>
+#include <yaz/diagbib1.h>
+
+#include <metaproxy/router_chain.hpp>
+#include <yaz/test.h>
+
+namespace mp = metaproxy_1;
+
+void tst(void)
+{
+ try {
+ mp::RouterChain router;
+ }
+ catch ( ... ) {
+ YAZ_CHECK(0);
+ }
+
+}
+
+int main(int argc, char **argv)
+{
+ YAZ_CHECK_INIT(argc, argv);
+ tst();
+ YAZ_CHECK_TERM;
+}
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
## Copyright (C) 2005-2013 Index Data
pkginclude_HEADERS= filter.hpp origin.hpp package.hpp \
- router.hpp session.hpp util.hpp xmlutil.hpp
+ router.hpp session.hpp util.hpp xmlutil.hpp router_chain.hpp
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef ROUTER_CHAIN_HPP
+#define ROUTER_CHAIN_HPP
+
+
+#include <metaproxy/router.hpp>
+
+#include <boost/scoped_ptr.hpp>
+#include <stdexcept>
+
+namespace metaproxy_1 {
+ class RouterChain : public Router {
+ class Rep;
+ class Pos;
+ public:
+ RouterChain();
+ virtual ~RouterChain();
+ virtual RoutePos *createpos() const;
+ RouterChain & append(const filter::Base &filter);
+ void start();
+ void stop();
+ private:
+ boost::scoped_ptr<Rep> m_p;
+ /// disabled because class is singleton
+ RouterChain(const RouterChain &);
+
+ /// disabled because class is singleton
+ RouterChain& operator=(const RouterChain &);
+ };
+}
+
+#endif
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
-Subproject commit 12f3277de6a4c46c27835d45890ab1732e3dab81
+Subproject commit 06ec18fbfaad00e4aaf915a2704c4b04c6f2924d
src_root=@abs_top_srcdir@
build_root=@abs_top_builddir@
-libs="@BOOST_LIB@ @BOOST_REGEX_LIB@ @BOOST_THREAD_LIB@ @YAZPPLIB@ @LIBS@"
+libs="@BOOST_LIB@ @BOOST_SYSTEM_LIB@ @BOOST_REGEX_LIB@ @BOOST_THREAD_LIB@ @YAZPPLIB@ @LIBS@"
lalibs="@YAZPPLALIB@ @LIBS@"
VERSION=@VERSION@
AM_CPPFLAGS = -I$(top_srcdir)/include $(USEMARCONINC)
-AM_LDFLAGS =
-
bin_SCRIPTS = metaproxy-config
-# Rules for the library..
-
-lib_LTLIBRARIES = libmetaproxy.la
-libmetaproxy_la_LDFLAGS = -version-info 4:0:0 -export-dynamic
-
-libmetaproxy_la_SOURCES = \
+filter_src = \
factory_filter.cpp factory_filter.hpp \
factory_static.cpp factory_static.hpp \
- filter.cpp \
filter_auth_simple.cpp filter_auth_simple.hpp \
filter_backend_test.cpp filter_backend_test.hpp \
filter_bounce.cpp filter_bounce.hpp \
filter_log.cpp filter_log.hpp \
filter_multi.cpp filter_multi.hpp \
filter_query_rewrite.cpp filter_query_rewrite.hpp \
+ filter_present_chunk.cpp filter_present_chunk.hpp \
filter_record_transform.cpp filter_record_transform.hpp \
filter_session_shared.cpp filter_session_shared.hpp \
+ filter_sd_remove.cpp filter_sd_remove.hpp \
filter_sort.cpp filter_sort.hpp \
filter_sru_to_z3950.cpp filter_sru_to_z3950.hpp \
filter_template.cpp filter_template.hpp \
filter_z3950_client.cpp filter_z3950_client.hpp \
filter_zeerex_explain.cpp filter_zeerex_explain.hpp \
filter_zoom.cpp filter_zoom.hpp \
+ router_flexml.hpp router_flexml.cpp
+
+lib_LTLIBRARIES = libmetaproxy.la
+libmetaproxy_la_LDFLAGS = -version-info 4:0:0 -export-dynamic
+
+libmetaproxy_la_SOURCES = \
+ filter.cpp \
gduutil.cpp gduutil.hpp \
origin.cpp \
package.cpp \
pipe.cpp pipe.hpp \
plainfile.cpp \
- router_chain.hpp router_chain.cpp \
- router_flexml.hpp router_flexml.cpp \
session.cpp \
sru_util.cpp sru_util.hpp \
thread_pool_observer.cpp thread_pool_observer.hpp \
url_recipe.cpp \
util.cpp \
html_parser.hpp html_parser.cpp \
- xmlutil.cpp
+ router_chain.cpp \
+ xmlutil.cpp
+libmetaproxy_la_LIBADD = $(YAZPPLALIB) \
+ $(BOOST_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) \
+ $(BOOST_REGEX_LIB)
-libmetaproxy_la_LIBADD = $(YAZPPLALIB) $(BOOST_LIB) $(BOOST_THREAD_LIB) $(BOOST_REGEX_LIB)
+metaproxy_LDADD = libmetaproxy.la $(YAZPPLALIB) \
+ $(BOOST_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) \
+ $(BOOST_REGEX_LIB) $(USEMARCONLALIB)
-# Rules for lib
+tstdl_LDADD = $(metaproxy_LDADD)
-LDADD = libmetaproxy.la $(YAZPPLALIB) $(BOOST_LIB) $(BOOST_THREAD_LIB) \
- $(BOOST_REGEX_LIB) $(USEMARCONLALIB)
+LDADD = $(metaproxy_LDADD) $(BOOST_TEST_LIB)
+AM_LDFLAGS = -export-dynamic
bin_PROGRAMS = metaproxy
-noinst_PROGRAMS = ex_filter_frontend_net ex_router_flexml tstdl
+noinst_PROGRAMS = tstdl
-ex_filter_frontend_net_SOURCES = ex_filter_frontend_net.cpp
-ex_router_flexml_SOURCES = ex_router_flexml.cpp
tstdl_SOURCES = tstdl.cpp
-metaproxy_SOURCES = metaproxy_prog.cpp
+metaproxy_SOURCES = metaproxy_prog.cpp $(filter_src)
# Rules for dl programs
pkglib_LTLIBRARIES = metaproxy_filter_dl.la
test_package1_SOURCES=test_package1.cpp
test_pipe_SOURCES=test_pipe.cpp
-test_filter1_SOURCES=test_filter1.cpp
-test_filter2_SOURCES=test_filter2.cpp
+test_filter1_SOURCES=test_filter1.cpp $(filter_src)
+test_filter2_SOURCES=test_filter2.cpp $(filter_src)
test_session1_SOURCES=test_session1.cpp
test_session2_SOURCES=test_session2.cpp
test_boost_threads_SOURCES=test_boost_threads.cpp
test_thread_pool_observer_SOURCES = test_thread_pool_observer.cpp
-test_filter_auth_simple_SOURCES = test_filter_auth_simple.cpp
-test_filter_factory_SOURCES = test_filter_factory.cpp
-test_filter_frontend_net_SOURCES = test_filter_frontend_net.cpp
-test_filter_log_SOURCES = test_filter_log.cpp
-test_filter_multi_SOURCES = test_filter_multi.cpp
-test_filter_query_rewrite_SOURCES = test_filter_query_rewrite.cpp
-test_filter_z3950_client_SOURCES = test_filter_z3950_client.cpp
-test_filter_backend_test_SOURCES = test_filter_backend_test.cpp
-test_filter_bounce_SOURCES = test_filter_bounce.cpp
-test_filter_record_transform_SOURCES = test_filter_record_transform.cpp
-test_filter_sru_to_z3950_SOURCES = test_filter_sru_to_z3950.cpp
-test_filter_virt_db_SOURCES = test_filter_virt_db.cpp
-test_filter_rewrite_SOURCES = test_filter_rewrite.cpp
+test_filter_auth_simple_SOURCES = test_filter_auth_simple.cpp $(filter_src)
+test_filter_factory_SOURCES = test_filter_factory.cpp $(filter_src)
+test_filter_frontend_net_SOURCES = test_filter_frontend_net.cpp $(filter_src)
+test_filter_log_SOURCES = test_filter_log.cpp $(filter_src)
+test_filter_multi_SOURCES = test_filter_multi.cpp $(filter_src)
+test_filter_query_rewrite_SOURCES = test_filter_query_rewrite.cpp $(filter_src)
+test_filter_z3950_client_SOURCES = test_filter_z3950_client.cpp $(filter_src)
+test_filter_backend_test_SOURCES = test_filter_backend_test.cpp $(filter_src)
+test_filter_bounce_SOURCES = test_filter_bounce.cpp $(filter_src)
+test_filter_record_transform_SOURCES = test_filter_record_transform.cpp \
+ $(filter_src)
+test_filter_sru_to_z3950_SOURCES = test_filter_sru_to_z3950.cpp $(filter_src)
+test_filter_virt_db_SOURCES = test_filter_virt_db.cpp $(filter_src)
test_ses_map_SOURCES = test_ses_map.cpp
-test_router_flexml_SOURCES = test_router_flexml.cpp
-test_html_parser_SOURCES = test_html_parser.cpp
+test_router_flexml_SOURCES = test_router_flexml.cpp $(filter_src)
test_xmlutil_SOURCES = test_xmlutil.cpp
-TESTLDADD = $(LDADD) $(BOOST_TEST_LIB)
-
-test_package1_LDADD = $(TESTLDADD)
-test_pipe_LDADD = $(TESTLDADD)
-test_filter1_LDADD = $(TESTLDADD)
-test_filter2_LDADD = $(TESTLDADD)
-test_session1_LDADD = $(TESTLDADD)
-test_session2_LDADD = $(TESTLDADD)
-test_boost_threads_LDADD = $(TESTLDADD)
-test_filter_auth_simple_LDADD = $(TESTLDADD)
-test_filter_factory_LDADD = $(TESTLDADD)
-test_filter_frontend_net_LDADD = $(TESTLDADD)
-test_filter_log_LDADD = $(TESTLDADD)
-test_filter_multi_LDADD = $(TESTLDADD)
-test_filter_query_rewrite_LDADD = $(TESTLDADD)
-test_filter_z3950_client_LDADD = $(TESTLDADD)
-test_filter_backend_test_LDADD = $(TESTLDADD)
-test_filter_bounce_LDADD = $(TESTLDADD)
-test_filter_record_transform_LDADD = $(TESTLDADD)
-test_filter_sru_to_z3950_LDADD = $(TESTLDADD)
-test_filter_virt_db_LDADD = $(TESTLDADD)
-test_filter_rewrite_LDADD = $(TESTLDADD)
-test_router_flexml_LDADD = $(TESTLDADD)
-test_ses_map_LDADD = $(TESTLDADD)
-test_thread_pool_observer_LDADD = $(TESTLDADD)
-test_html_parser_LDADD = $(TESTLDADD)
-test_xmlutil_LDADD = $(TESTLDADD)
+test_html_parser_SOURCES = test_html_parser.cpp $(filter_src)
+test_filter_rewrite_SOURCES = test_filter_rewrite.cpp $(filter_src)
# doxygen target
dox:
+++ /dev/null
-/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
-
-Metaproxy is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "config.hpp"
-
-#include <cstdlib>
-#include <iostream>
-#include <stdexcept>
-
-#include <yaz/options.h>
-#include <metaproxy/util.hpp>
-#include "filter_frontend_net.hpp"
-#include "filter_z3950_client.hpp"
-#include "filter_virt_db.hpp"
-#include "filter_session_shared.hpp"
-#include "filter_log.hpp"
-
-#include "router_chain.hpp"
-#include <metaproxy/package.hpp>
-
-namespace mp = metaproxy_1;
-
-class HTTPFilter: public mp::filter::Base {
-public:
- void process(mp::Package & package) const {
- if (package.session().is_closed())
- {
- // std::cout << "Got Close.\n";
- }
-
- Z_GDU *gdu = package.request().get();
- if (gdu && gdu->which == Z_GDU_HTTP_Request)
- {
- mp::odr odr;
- Z_GDU *gdu = z_get_HTTP_Response(odr, 200);
- Z_HTTP_Response *http_res = gdu->u.HTTP_Response;
-
- z_HTTP_header_add(odr, &http_res->headers,
- "Content-Type", "text/plain");
-
- http_res->content_buf =
- odr_strdup(odr, "Welcome to Metaproxy");
- http_res->content_len = strlen(http_res->content_buf);
-
- package.response() = gdu;
- }
- return package.move();
- };
- void configure(const xmlNode * ptr, bool test_only,
- const char *path) { };
-};
-
-int main(int argc, char **argv)
-{
- try
- {
- std::vector<std::string> ports;
- int duration = -1;
- int ret;
- char *arg;
-
- while ((ret = options("h{help}d{duration}:p{port}:",
- argv, argc, &arg)) != -2)
- {
- switch(ret)
- {
- case -1:
- std::cerr << "bad option " << arg << std::endl;
- case 'h':
- std::cerr << "ex_filter_frontend_net\n"
- " -h|--help help\n"
- " -d|--duration n duration\n"
- " -p|--port n port number\n"
- << std::endl;
- break;
- case 'p':
- ports.push_back(arg);
- break;
- case 'd':
- duration = atoi(arg);
- break;
- }
- }
- {
- for (size_t i = 0; i<ports.size(); i++)
- std::cout << "port " << i << " " << ports[i] << "\n";
-
- mp::RouterChain router;
-
- // put frontend filter in router
- mp::filter::FrontendNet filter_front;
- filter_front.set_ports(ports);
-
- // 0=no time, >0 timeout in seconds
- if (duration != -1)
- filter_front.set_listen_duration(duration);
-
- router.append(filter_front);
-
- // put log filter in router
- mp::filter::Log filter_log_front("FRONT");
- router.append(filter_log_front);
-
- // put Virt db filter in router
- mp::filter::VirtualDB filter_virt_db;
- filter_virt_db.add_map_db2target("gils", "indexdata.dk/gils",
- "");
- filter_virt_db.add_map_db2target("Default", "localhost:9999/Default",
- "");
- filter_virt_db.add_map_db2target("2", "localhost:9999/Slow", "");
- router.append(filter_virt_db);
-
- mp::filter::SessionShared filter_session_shared;
- //router.append(filter_session_shared);
-
- mp::filter::Log filter_log_back("BACK");
- router.append(filter_log_back);
-
- // put HTTP backend filter in router
- HTTPFilter filter_init;
- router.append(filter_init);
-
- // put Z39.50 backend filter in router
- mp::filter::Z3950Client z3950_client;
- router.append(z3950_client);
-
- mp::Session session;
- mp::Origin origin;
- mp::Package pack(session, origin);
-
- pack.router(router).move();
- }
- }
- catch ( ... ) {
- std::cerr << "unknown exception\n";
- std::exit(1);
- }
- std::exit(0);
-}
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
+++ /dev/null
-/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
-
-Metaproxy is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "config.hpp"
-
-#include <yaz/options.h>
-
-#include <iostream>
-#include <stdexcept>
-
-#include <metaproxy/filter.hpp>
-#include <metaproxy/package.hpp>
-#include "router_flexml.hpp"
-#include "factory_static.hpp"
-
-namespace mp = metaproxy_1;
-
-int main(int argc, char **argv)
-{
- try
- {
- int ret;
- char *arg;
- char *fname = 0;
-
- while ((ret = options("h{help}c{config}:",
- argv, argc, &arg)) != -2)
- {
- switch(ret)
- {
- case -1:
- std::cerr << "bad option " << arg << std::endl;
- case 'h':
- std::cerr << "ex_router_flexml\n"
- " -h|--help help\n"
- " -c|--config fname configuation\n"
- << std::endl;
- std::exit(1);
- case 'c':
- fname = arg;
- }
- }
-
- xmlDocPtr doc = 0;
- if (fname)
- {
- doc = xmlParseFile(fname);
- if (!doc)
- {
- std::cerr << "xmlParseFile failed\n";
- std::exit(1);
- }
- }
- else
- {
- std::cerr << "No configuration given\n";
- std::exit(1);
- }
- if (doc)
- {
- mp::FactoryStatic factory;
- mp::RouterFleXML router(doc, factory, false, 0);
-
- mp::Package pack;
-
- pack.router(router).move();
-
- xmlFreeDoc(doc);
- }
- }
- catch ( ... ) {
- std::cerr << "Unknown Exception" << std::endl;
- throw;
- std::exit(1);
- }
- std::exit(0);
-}
-
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
{
return true;
}
-
- std::string full_path = path + "/metaproxy_filter_" + fi + ".so";
- void *dl_handle = dlopen(full_path.c_str(), RTLD_GLOBAL|RTLD_NOW);
- if (!dl_handle)
- {
- const char *dl = dlerror();
- std::cout << "dlopen " << full_path << " failed. dlerror=" << dl <<
- std::endl;
- return false;
- }
-
std::string full_name = "metaproxy_1_filter_" + fi;
+ void *dl_handle = dlopen(0, RTLD_GLOBAL|RTLD_NOW);
void *dlsym_ptr = dlsym(dl_handle, full_name.c_str());
+
+ if (!dlsym_ptr)
+ {
+ std::string full_path = path + "/metaproxy_filter_" + fi + ".so";
+ dl_handle = dlopen(full_path.c_str(), RTLD_GLOBAL|RTLD_NOW);
+ if (!dl_handle)
+ {
+ const char *dl = dlerror();
+ std::cout << "dlopen " << full_path << " failed. dlerror=" << dl <<
+ std::endl;
+ return false;
+ }
+ dlsym_ptr = dlsym(dl_handle, full_name.c_str());
+ }
if (!dlsym_ptr)
{
std::cout << "dlsym " << full_name << " failed\n";
#include "filter_load_balance.hpp"
#include "filter_log.hpp"
#include "filter_multi.hpp"
+#include "filter_present_chunk.hpp"
#include "filter_query_rewrite.hpp"
#include "filter_record_transform.hpp"
+#include "filter_sd_remove.hpp"
#include "filter_session_shared.hpp"
#include "filter_sort.hpp"
#include "filter_sru_to_z3950.hpp"
mp::FactoryStatic::FactoryStatic()
{
+#ifdef HAVE_DLFCN_H
struct metaproxy_1_filter_struct *buildins[] = {
&metaproxy_1_filter_auth_simple,
&metaproxy_1_filter_backend_test,
&metaproxy_1_filter_load_balance,
&metaproxy_1_filter_log,
&metaproxy_1_filter_multi,
+ &metaproxy_1_filter_present_chunk,
&metaproxy_1_filter_query_rewrite,
&metaproxy_1_filter_record_transform,
+ &metaproxy_1_filter_sd_remove,
&metaproxy_1_filter_session_shared,
&metaproxy_1_filter_sort,
&metaproxy_1_filter_sru_to_z3950,
for (i = 0; buildins[i]; i++)
add_creator(buildins[i]->type, buildins[i]->creator);
+// WIN32
+#endif
}
if (http_response)
{
res_gdu = o.create_HTTP_Response(package.session(), hreq, 200);
+ Z_HTTP_Header **hp = &http_response->headers;
+ while (*hp)
+ {
+ if (!yaz_matchstr((*hp)->name, "Transfer-Encoding"))
+ *hp = (*hp)->next;
+ else
+ hp = &(*hp)->next;
+ }
res_gdu->u.HTTP_Response = http_response;
}
else
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "config.hpp"
+#include "filter_present_chunk.hpp"
+
+#include <time.h>
+#include <yaz/log.h>
+#include <yaz/copy_types.h>
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
+
+namespace mp = metaproxy_1;
+namespace yf = mp::filter;
+
+namespace metaproxy_1 {
+ namespace filter {
+ class PresentChunk::Impl {
+ public:
+ Impl();
+ ~Impl();
+ void process(metaproxy_1::Package & package);
+ void configure(const xmlNode * ptr);
+ void chunk_it(metaproxy_1::Package & package, Z_APDU *apdu);
+ private:
+ Odr_int chunk_number;
+ };
+ }
+}
+
+yf::PresentChunk::PresentChunk() : m_p(new Impl)
+{
+}
+
+yf::PresentChunk::~PresentChunk()
+{ // must have a destructor because of boost::scoped_ptr
+}
+
+void yf::PresentChunk::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
+{
+ m_p->configure(xmlnode);
+}
+
+void yf::PresentChunk::process(mp::Package &package) const
+{
+ m_p->process(package);
+}
+
+yf::PresentChunk::Impl::Impl() : chunk_number(0)
+{
+}
+
+yf::PresentChunk::Impl::~Impl()
+{
+}
+
+void yf::PresentChunk::Impl::configure(const xmlNode *ptr)
+{
+ for (ptr = ptr->children; ptr; ptr = ptr->next)
+ {
+ if (ptr->type != XML_ELEMENT_NODE)
+ continue;
+ if (!strcmp((const char *) ptr->name, "chunk"))
+ {
+ chunk_number = mp::xml::get_int(ptr, 0);
+ }
+ else
+ {
+ throw mp::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }
+ }
+}
+
+void yf::PresentChunk::Impl::chunk_it(mp::Package &package,
+ Z_APDU *apdu)
+{
+ mp::odr odr;
+ Z_PresentRequest *pr = apdu->u.presentRequest;
+
+ Odr_int total = *pr->numberOfRecordsRequested;
+ Odr_int start = *pr->resultSetStartPoint;
+ Odr_int offset = 0;
+ Z_NamePlusRecordList *npl = (Z_NamePlusRecordList *)
+ odr_malloc(odr, sizeof(*npl));
+ npl->num_records = total;
+ npl->records = (Z_NamePlusRecord **)
+ odr_malloc(odr, sizeof(*npl->records) * total);
+ while (offset < total)
+ {
+ Odr_int left = total - offset;
+
+ Package pp(package.session(), package.origin());
+
+ *pr->numberOfRecordsRequested =
+ left > chunk_number ? chunk_number : left;
+
+ *pr->resultSetStartPoint = start + offset;
+
+ pp.copy_filter(package);
+ pp.request() = apdu;
+
+ pp.move();
+
+ if (pp.session().is_closed())
+ {
+ package.session().close();
+ return;
+ }
+ Z_GDU *gdu_res = pp.response().get();
+ if (gdu_res && gdu_res->which == Z_GDU_Z3950 &&
+ gdu_res->u.z3950->which == Z_APDU_presentResponse)
+ {
+ Z_PresentResponse *pres =
+ gdu_res->u.z3950->u.presentResponse;
+ if (pres->records &&
+ pres->records->which == Z_Records_DBOSD)
+ {
+ Z_NamePlusRecordList *nprl =
+ pres->records->u.databaseOrSurDiagnostics;
+ int i;
+ for (i = 0; i < nprl->num_records; i++)
+ {
+ ODR o = odr;
+ npl->records[offset+i] = yaz_clone_z_NamePlusRecord(
+ nprl->records[i], o->mem);
+ }
+ offset += nprl->num_records;
+ }
+ else
+ {
+ package.response() = pp.response();
+ return;
+ }
+ }
+ else
+ {
+ package.response() = pp.response();
+ return;
+ }
+ }
+
+ yaz_log(YLOG_LOG, "building response . %lld", offset);
+
+ Z_APDU *a = zget_APDU(odr, Z_APDU_presentResponse);
+ Z_PresentResponse *pres = a->u.presentResponse;
+ pres->records = (Z_Records *)
+ odr_malloc(odr, sizeof(Z_Records));
+ pres->records->which = Z_Records_DBOSD;
+ pres->records->u.databaseOrSurDiagnostics = npl;
+ npl->num_records = offset;
+ *pres->numberOfRecordsReturned = offset;
+
+ package.response() = a;
+}
+
+void yf::PresentChunk::Impl::process(mp::Package &package)
+{
+ Z_GDU *gdu = package.request().get();
+ if (gdu && gdu->which == Z_GDU_Z3950)
+ {
+ Z_APDU *apdu = gdu->u.z3950;
+ if (apdu->which == Z_APDU_presentRequest && chunk_number > 0)
+ chunk_it(package, apdu);
+ else
+ package.move();
+ }
+ else
+ package.move();
+}
+
+static mp::filter::Base* filter_creator()
+{
+ return new mp::filter::PresentChunk;
+}
+
+extern "C" {
+ struct metaproxy_1_filter_struct metaproxy_1_filter_present_chunk = {
+ 0,
+ "present_chunk",
+ filter_creator
+ };
+}
+
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef FILTER_PRESENT_CHUNK_HPP
+#define FILTER_PRESENT_CHUNK_HPP
+
+#include <boost/scoped_ptr.hpp>
+
+#include <metaproxy/filter.hpp>
+
+namespace metaproxy_1 {
+ namespace filter {
+ class PresentChunk : public Base {
+ class Impl;
+ boost::scoped_ptr<Impl> m_p;
+ public:
+ PresentChunk();
+ ~PresentChunk();
+ void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
+ };
+ }
+}
+
+extern "C" {
+ extern struct metaproxy_1_filter_struct metaproxy_1_filter_present_chunk;
+}
+
+#endif
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "config.hpp"
+#include "filter_sd_remove.hpp"
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
+#include <yaz/zgdu.h>
+#include <yaz/diagbib1.h>
+#include <metaproxy/filter.hpp>
+
+namespace metaproxy_1 {
+ namespace filter {
+ class SD_Remove : public Base {
+ public:
+ SD_Remove();
+ ~SD_Remove();
+ void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
+ };
+ }
+}
+
+namespace mp = metaproxy_1;
+namespace yf = mp::filter;
+
+yf::SD_Remove::SD_Remove()
+{
+}
+
+yf::SD_Remove::~SD_Remove()
+{
+}
+
+void yf::SD_Remove::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
+{
+ if (xmlnode)
+ {
+ xmlNode *ptr;
+ for (ptr = xmlnode->children; ptr; ptr = ptr->next)
+ {
+ if (ptr->type == XML_ELEMENT_NODE)
+ throw mp::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }
+ }
+}
+
+static void diagrec_to_sutrs(WRBUF b, Z_DiagRec *diag)
+{
+ wrbuf_puts(b," ERROR ");
+ if (diag->which != Z_DiagRec_defaultFormat)
+ wrbuf_puts(b, "diag not in default format");
+ else
+ {
+ Z_DefaultDiagFormat *e = diag->u.defaultFormat;
+ wrbuf_printf(b, ODR_INT_PRINTF ": %s", *e->condition,
+ diagbib1_str(*e->condition));
+ if (e->u.v2Addinfo && *e->u.v2Addinfo) // v3Addinfo is same data
+ {
+ wrbuf_puts(b, " -- ");
+ wrbuf_puts(b, e->u.v2Addinfo);
+ }
+ }
+ wrbuf_puts(b, "\n");
+}
+
+void yf::SD_Remove::process(mp::Package &package) const
+{
+ package.move();
+
+ Z_GDU *gdu_res = package.response().get();
+ if (gdu_res && gdu_res->which == Z_GDU_Z3950)
+ {
+ Z_NamePlusRecordList *records = 0;
+ Z_APDU *apdu = gdu_res->u.z3950;
+ if (apdu->which == Z_APDU_presentResponse)
+ {
+ Z_PresentResponse * pr_res = apdu->u.presentResponse;
+ if (pr_res->numberOfRecordsReturned
+ && *(pr_res->numberOfRecordsReturned) > 0
+ && pr_res->records
+ && pr_res->records->which == Z_Records_DBOSD)
+ {
+ records = pr_res->records->u.databaseOrSurDiagnostics;
+ }
+ }
+ if (apdu->which == Z_APDU_searchResponse)
+ {
+ Z_SearchResponse *sr_res = apdu->u.searchResponse;
+ if (
+ sr_res->numberOfRecordsReturned
+ && *(sr_res->numberOfRecordsReturned) > 0
+ && sr_res->records
+ && sr_res->records->which == Z_Records_DBOSD)
+ {
+ records = sr_res->records->u.databaseOrSurDiagnostics;
+ }
+ }
+ if (records)
+ {
+ mp::odr odr_en(ODR_ENCODE);
+ int i;
+ for (i = 0; i < records->num_records; i++)
+ {
+ Z_NamePlusRecord *npr = records->records[i];
+ if (npr->which == Z_NamePlusRecord_surrogateDiagnostic)
+ {
+ WRBUF w = wrbuf_alloc();
+ diagrec_to_sutrs(w, npr->u.surrogateDiagnostic);
+ npr->which = Z_NamePlusRecord_databaseRecord;
+ npr->u.databaseRecord = z_ext_record_sutrs(odr_en,
+ wrbuf_buf(w),
+ wrbuf_len(w));
+ wrbuf_destroy(w);
+ }
+ }
+ package.response() = gdu_res;
+ }
+ }
+}
+
+
+static mp::filter::Base* filter_creator()
+{
+ return new mp::filter::SD_Remove;
+}
+
+extern "C" {
+ struct metaproxy_1_filter_struct metaproxy_1_filter_sd_remove = {
+ 0,
+ "sd_remove",
+ filter_creator
+ };
+}
+
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2013 Index Data
+
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef FILTER_SD_REMOVE_HPP
+#define FILTER_SD_REMOVE_HPP
+
+extern "C" {
+ extern struct metaproxy_1_filter_struct metaproxy_1_filter_sd_remove;
+}
+
+#endif
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/filter.hpp>
#include <list>
+++ /dev/null
-/* This file is part of Metaproxy.
- Copyright (C) 2005-2013 Index Data
-
-Metaproxy is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef ROUTER_CHAIN_HPP
-#define ROUTER_CHAIN_HPP
-
-
-#include <metaproxy/router.hpp>
-
-#include <boost/scoped_ptr.hpp>
-#include <stdexcept>
-
-namespace metaproxy_1 {
- class RouterChain : public Router {
- class Rep;
- class Pos;
- public:
- RouterChain();
- virtual ~RouterChain();
- virtual RoutePos *createpos() const;
- RouterChain & append(const filter::Base &filter);
- void start();
- void stop();
- private:
- boost::scoped_ptr<Rep> m_p;
- /// disabled because class is singleton
- RouterChain(const RouterChain &);
-
- /// disabled because class is singleton
- RouterChain& operator=(const RouterChain &);
- };
-}
-
-#endif
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
#include <libxml/tree.h>
#include <metaproxy/filter.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#include <iostream>
#include "filter_auth_simple.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_backend_test.hpp"
#include "filter_log.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#include <yaz/zgdu.h>
#include "filter_bounce.hpp"
#include <metaproxy/util.hpp>
#include "gduutil.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#include <iostream>
#include <metaproxy/util.hpp>
#include "filter_frontend_net.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_log.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_multi.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_query_rewrite.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "config.hpp"
#include "filter_record_transform.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_http_client.hpp"
#include "filter_http_rewrite.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#include <boost/regex.hpp>
#include "filter_sru_to_z3950.hpp"
#include <metaproxy/util.hpp>
#include "sru_util.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#include <iostream>
#include "filter_backend_test.hpp"
#include "filter_log.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
#include "filter_z3950_client.hpp"
#include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
#include <metaproxy/package.hpp>
#define BOOST_AUTO_TEST_MAIN
DEBUG=0 # 0 for release, 1 for debug
# Metaproxy version
-VERSION=1.3.55
+VERSION=1.3.56
# YAZ and YAZ++ directories
YAZ_DIR=..\..\yaz
all: dirs config yaz yazpp libxslt progs
-progs: metaproxy ex_filter_frontend_net # test_pipe does not work
+progs: metaproxy # test_pipe does not work
NSIS="c:\program files\nsis\makensis.exe"
nsis: all
############### Targets - what to make
###########################################################
-EX_FILTER_FRONTEND_NET=$(BINDIR)\ex_filter_frontend_net.exe
METAPROXY_PROG=$(BINDIR)\metaproxy.exe
TEST_PIPE=$(BINDIR)\test_pipe.exe
# shortcut names defined here
-ex_filter_frontend_net: $(EX_FILTER_FRONTEND_NET)
metaproxy: $(METAPROXY_PROG)
test_pipe: $(TEST_PIPE)
$(OBJDIR)\filter_bounce.obj \
$(OBJDIR)\filter_cql_to_rpn.obj \
$(OBJDIR)\filter_frontend_net.obj \
+ $(OBJDIR)\filter_http_client.obj \
$(OBJDIR)\filter_http_file.obj \
+ $(OBJDIR)\filter_http_rewrite1.obj \
$(OBJDIR)\filter_limit.obj \
$(OBJDIR)\filter_load_balance.obj \
$(OBJDIR)\filter_log.obj \
$(OBJDIR)\filter_multi.obj \
+ $(OBJDIR)\filter_present_chunk.obj \
$(OBJDIR)\filter_query_rewrite.obj \
$(OBJDIR)\filter_record_transform.obj \
+ $(OBJDIR)\filter_sd_remove.obj \
$(OBJDIR)\filter_session_shared.obj \
$(OBJDIR)\filter_sort.obj \
$(OBJDIR)\filter_sru_to_z3950.obj \
$(OBJDIR)\util.obj \
$(OBJDIR)\xmlutil.obj
-EX_FILTER_FRONTEND_NET_OBJS = $(OBJDIR)\ex_filter_frontend_net.obj
METAPROXY_OBJS = $(OBJDIR)\metaproxy_prog.obj
TEST_PIPE_OBJS = $(OBJDIR)\test_pipe.obj
############### Linking
###########################################################
-$(EX_FILTER_FRONTEND_NET) : "$(BINDIR)" $(EX_FILTER_FRONTEND_NET_OBJS) $(PROJECT_DLL_OBJS)
- $(LINK) \
- $(LNKOPT) \
- $(PROG_LINK_OPTIONS) \
- $(LINK_LIBS) \
- $(PROJECT_DLL_OBJS) \
- $(EX_FILTER_FRONTEND_NET_OBJS) \
- /out:$(EX_FILTER_FRONTEND_NET)
-
$(METAPROXY_PROG) : "$(BINDIR)" $(METAPROXY_OBJS) $(PROJECT_DLL_OBJS)
$(LINK) \
$(LNKOPT) \
filter_multi.rnc \
filter_query_rewrite.rnc \
filter_record_transform.rnc \
+filter_sd_remove.rnc \
filter_session_shared.rnc \
filter_sort.rnc \
filter_sru_z3950.rnc \
--- /dev/null
+# Metaproxy XML config file schema
+
+namespace mp = "http://indexdata.com/metaproxy"
+
+filter_present_chunk =
+ attribute type { "present_chunk" },
+ attribute id { xsd:NCName }?,
+ attribute name { xsd:NCName }?,
+ element mp:chunk { xsd:integer }?
+
--- /dev/null
+# Metaproxy XML config file schema
+
+namespace mp = "http://indexdata.com/metaproxy"
+
+filter_sd_remove =
+ attribute type { "sd_remove" },
+ attribute id { xsd:NCName }?,
+ attribute name { xsd:NCName }?
+
include "filter_load_balance.rnc"
include "filter_log.rnc"
include "filter_multi.rnc"
+include "filter_present_chunk.rnc"
include "filter_query_rewrite.rnc"
include "filter_record_transform.rnc"
+include "filter_sd_remove.rnc"
include "filter_session_shared.rnc"
include "filter_sort.rnc"
include "filter_sru_z3950.rnc"
| filter_load_balance
| filter_log
| filter_multi
+ | filter_present_chunk
| filter_query_rewrite
| filter_record_transform
+ | filter_sd_remove
| filter_session_shared
| filter_sort
| filter_sru_z3950