X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_frontend_net.cpp;h=f2e0b8819fcc1ec58c7290881e52e6134c2d573b;hb=161ecb1e2ce88650c67f13c352f57301f560a52a;hp=22a3a9d7319ed724843a757675a4bb614cc1a33c;hpb=85189f2d04df4cfc8b16ee78187fb89d00dfe3ff;p=metaproxy-moved-to-github.git diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 22a3a9d..f2e0b88 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -1,7 +1,5 @@ -/* $Id: filter_frontend_net.cpp,v 1.26 2008-02-20 15:07:51 adam Exp $ - Copyright (c) 2005-2008, Index Data. - -This file is part of Metaproxy. +/* This file is part of Metaproxy. + Copyright (C) 2005-2008 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 @@ -14,10 +12,9 @@ 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 Metaproxy; see the file LICENSE. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - */ +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" @@ -151,8 +148,18 @@ void mp::ThreadPoolPackage::result() "unhandled Z39.50 request"); m_session->send_Z_PDU(apdu_response, &len); - m_package->session().close(); } + else if (z_gdu && z_gdu->which == Z_GDU_HTTP_Request) + { + // For HTTP, respond with Server Error + int len; + mp::odr odr; + Z_GDU *zgdu_res + = odr.create_HTTP_Response(m_package->session(), + z_gdu->u.HTTP_Request, 500); + m_session->send_GDU(zgdu_res, &len); + } + m_package->session().close(); } if (m_session->m_no_requests == 0 && m_package->session().is_closed())