And require YAZ 4.2.59 because it has z_HTTP_header_remove.
AC_MSG_ERROR([YAZ++ development libraries missing])
fi
CPPFLAGS="$YAZPPINC $CPPFLAGS"
-AC_MSG_CHECKING([if YAZ is version 4.2.50 or later])
+AC_MSG_CHECKING([if YAZ is version 4.2.59 or later])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <yaz/yaz-version.h>]],
[[
-#if YAZ_VERSIONL < 0x40232
+#if YAZ_VERSIONL < 0x4023B
#error too old
#endif
]])],
Maintainer: Adam Dickmeiss <adam@indexdata.dk>
Priority: extra
Build-Depends: debhelper (>= 5),
- libyaz4-dev (>= 4.2.50),
+ libyaz4-dev (>= 4.2.59),
libyazpp5-dev (>= 1.4.1),
libxslt1-dev,
libboost-dev,
Source: metaproxy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prefix: %{_prefix} /etc/metaproxy
-BuildRequires: pkgconfig, libyaz4-devel >= 4.2.50, libyazpp5-devel >= 1.4.1
+BuildRequires: pkgconfig, libyaz4-devel >= 4.2.59, libyazpp5-devel >= 1.4.1
BuildRequires: libxslt-devel, boost-devel
Conflicts: cf-engine <= 2.12.5
Packager: Adam Dickmeiss <adam@indexdata.dk>
Z_GDU *res_gdu = 0;
mp::odr o;
yaz_url_t yaz_url = yaz_url_create();
- std::string uri;
+ const char *http_proxy =
+ z_HTTP_header_remove(&hreq->headers, "X-Metaproxy-Proxy");
+
+ if (!http_proxy)
+ http_proxy = proxy_host.c_str();
- if (proxy_host.length())
- yaz_url_set_proxy(yaz_url, proxy_host.c_str());
+ if (*http_proxy)
+ yaz_url_set_proxy(yaz_url, http_proxy);
+ std::string uri;
if (hreq->path[0] == '/')
{
if (default_host.length())
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;
- }
+ z_HTTP_header_remove(&http_response->headers, "Transfer-Encoding");
res_gdu->u.HTTP_Response = http_response;
}
else