From: Adam Dickmeiss Date: Wed, 2 Oct 2013 12:02:23 +0000 (+0200) Subject: Proper diagnostics for unsupp operation YAZ-696 X-Git-Tag: v5.0.1~7 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=044e617fc468bfce45f39e66fe8d34b99654eba2 Proper diagnostics for unsupp operation YAZ-696 --- diff --git a/src/seshigh.c b/src/seshigh.c index d357095..c744808 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -1260,8 +1260,9 @@ static void srw_bend_explain(association *assoc, { Z_SRW_explainRequest *srw_req = sr->u.explain_request; yaz_log(log_requestdetail, "Got SRW ExplainRequest"); - *http_code = 404; srw_bend_init(assoc, &srw_res->diagnostics, &srw_res->num_diagnostics, sr); + if (!assoc->init && srw_res->num_diagnostics == 0) + *http_code = 404; if (assoc->init) { bend_explain_rr rr; @@ -1487,8 +1488,9 @@ static void srw_bend_update(association *assoc, Z_SRW_updateRequest *srw_req = sr->u.update_request; yaz_log(log_session, "SRWUpdate action=%s", srw_req->operation); yaz_log(YLOG_DEBUG, "num_diag = %d", srw_res->num_diagnostics ); - *http_code = 404; srw_bend_init(assoc, &srw_res->diagnostics, &srw_res->num_diagnostics, sr); + if (!assoc->init && srw_res->num_diagnostics == 0) + *http_code = 404; if (assoc->init) { bend_update_rr rr;