X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsrwutil.c;h=a809dd73f2504d0219cd925b1ffc27d7abd79669;hb=9a32992b1041bf622fdc4825262f5f7110494cce;hp=513ae890d1141e3d91e4c56c5e9dff34306ce427;hpb=dd7de5f04a0de631f98ad9c4774f2111a85388e5;p=yaz-moved-to-github.git diff --git a/src/srwutil.c b/src/srwutil.c index 513ae89..a809dd7 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -2,7 +2,11 @@ * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srwutil.c,v 1.16 2004-10-02 13:28:26 adam Exp $ + * $Id: srwutil.c,v 1.18 2004-10-15 00:19:01 adam Exp $ + */ +/** + * \file srwutil.c + * \brief Implements SRW/SRU utilities. */ #include @@ -311,12 +315,17 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, } } if (!version) - yaz_add_srw_diagnostic(decode, diag, num_diag, 7, "version"); - else if (version && strcmp(version, "1.1")) + { + if (uri_name) + yaz_add_srw_diagnostic(decode, diag, num_diag, 7, "version"); + version = "1.1"; + } + if (strcmp(version, "1.1")) yaz_add_srw_diagnostic(decode, diag, num_diag, 5, "1.1"); if (!operation) { - yaz_add_srw_diagnostic(decode, diag, num_diag, 7, "operation"); + if (uri_name) + yaz_add_srw_diagnostic(decode, diag, num_diag, 7, "operation"); operation = "explain"; } if (!strcmp(operation, "searchRetrieve"))