projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SRU GET/Solr base URLs may hold additional ?args YAZ-729
[yaz-moved-to-github.git]
/
src
/
srwutil.c
diff --git
a/src/srwutil.c
b/src/srwutil.c
index
7be212a
..
017ec5e
100644
(file)
--- a/
src/srwutil.c
+++ b/
src/srwutil.c
@@
-1064,7
+1064,8
@@
int yaz_sru_get_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu,
path = (char *)
odr_malloc(encode, strlen(hreq->path) + strlen(uri_args) + 4);
path = (char *)
odr_malloc(encode, strlen(hreq->path) + strlen(uri_args) + 4);
- sprintf(path, "%s?%s", hreq->path, uri_args);
+ sprintf(path, "%s%c%s", hreq->path, strchr(hreq->path, '?') ? '&' : '?',
+ uri_args);
hreq->path = path;
z_HTTP_header_add_content_type(encode, &hreq->headers,
hreq->path = path;
z_HTTP_header_add_content_type(encode, &hreq->headers,