From: Adam Dickmeiss Date: Wed, 28 May 2008 15:13:39 +0000 (+0200) Subject: Unhandled HTTP request is turned in to HTTP response 500 (server error). X-Git-Tag: v1.0.14~18 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=4a80cad6cba3a9894a78c96df62c752cace5880f;p=metaproxy-moved-to-github.git Unhandled HTTP request is turned in to HTTP response 500 (server error). --- diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 1bee3cd..f2e0b88 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -148,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())