From 517e528f09d1f80ccc4948f9d38eeb79f8501975 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 20 Mar 2007 07:05:10 +0000 Subject: [PATCH] Fixed bug #975: HTTP HEAD Request kills SRU server. --- src/filter_sru_to_z3950.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/filter_sru_to_z3950.cpp b/src/filter_sru_to_z3950.cpp index a4f2f6d..9cb97bb 100644 --- a/src/filter_sru_to_z3950.cpp +++ b/src/filter_sru_to_z3950.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_sru_to_z3950.cpp,v 1.30 2007-03-08 09:43:37 adam Exp $ +/* $Id: filter_sru_to_z3950.cpp,v 1.31 2007-03-20 07:05:10 adam Exp $ Copyright (c) 2005-2007, Index Data. See the LICENSE file for details @@ -179,11 +179,21 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package) sru_pdu_res, soap, charset, stylesheet))) { - mp_util::build_sru_explain(package, odr_en, sru_pdu_res, - sruinfo, explainnode); - mp_util::build_sru_response(package, odr_en, soap, - sru_pdu_res, charset, stylesheet); - // package.session().close(); + if (soap) + { + mp_util::build_sru_explain(package, odr_en, sru_pdu_res, + sruinfo, explainnode); + mp_util::build_sru_response(package, odr_en, soap, + sru_pdu_res, charset, stylesheet); + } + else + { + metaproxy_1::odr odr; + Z_GDU *zgdu_res = + odr.create_HTTP_Response(package.session(), + zgdu_req->u.HTTP_Request, 400); + package.response() = zgdu_res; + } return; } -- 1.7.10.4