From 7d2cc7589c630c539f114b24eaff53a98b696005 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 15 Jul 2011 15:47:03 +0200 Subject: [PATCH] Add support for extra parameters --- src/solr.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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"; -- 1.7.10.4