From: Dennis Schafroth Date: Fri, 15 Jul 2011 13:47:03 +0000 (+0200) Subject: Add support for extra parameters X-Git-Tag: v4.2.5~12 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=7d2cc7589c630c539f114b24eaff53a98b696005;p=yaz-moved-to-github.git Add support for extra parameters --- diff --git a/src/solr.c b/src/solr.c index 701e9f3..28b8f11 100644 --- a/src/solr.c +++ b/src/solr.c @@ -4,7 +4,7 @@ */ /** * \file solr.c - * \brief Implements SOAP Webservice decoding/encoding + * \brief Implements Solr decoding/encoding */ #if HAVE_CONFIG_H #include @@ -356,7 +356,20 @@ int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, } else return -1; - name[i] = 0; + + if (srw_pdu->extra_args) + { + Z_SRW_extra_arg *ea = srw_pdu->extra_args; + for (; ea && i < SOLR_MAX_PARAMETERS; ea = ea->next) + { + name[i] = ea->name; + value[i] = ea->value; + i++; + } + } + + name[i++] = 0; + yaz_array_to_uri(&uri_args, encode, name, value); hreq->method = "GET";