From: Adam Dickmeiss Date: Wed, 7 Jan 2004 22:19:05 +0000 (+0000) Subject: Send diagnostic 7 for missing query X-Git-Tag: YAZPP.0.7.4.larry~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=aa7a95a1c8d579f7c5f339f1bdece2e53424de30;p=yazpp-moved-to-github.git Send diagnostic 7 for missing query --- diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index febff85..bd8dee5 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy.cpp,v 1.82 2004-01-07 21:29:26 adam Exp $ + * $Id: yaz-proxy.cpp,v 1.83 2004-01-07 22:19:05 adam Exp $ */ #include @@ -1604,6 +1604,11 @@ void Yaz_Proxy::handle_incoming_HTTP(Z_HTTP_Request *hreq) if (srw_req->query_type == Z_SRW_query_type_cql) { + if (!srw_req->query.cql) + { + send_to_srw_client_error(7); + return; + } Z_External *ext = (Z_External *) odr_malloc(m_s2z_odr_search, sizeof(*ext)); ext->direct_reference = @@ -1643,7 +1648,7 @@ void Yaz_Proxy::handle_incoming_HTTP(Z_HTTP_Request *hreq) } else { - send_to_srw_client_error(11); + send_to_srw_client_error(7); return; } @@ -1747,6 +1752,10 @@ void Yaz_Proxy::handle_incoming_HTTP(Z_HTTP_Request *hreq) send_srw_explain(); return; } + else + { + send_to_srw_client_error(4); + } } int len = 0; Z_GDU *p = z_get_HTTP_Response(odr_encode(), 400);