X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsrwutil.c;fp=src%2Fsrwutil.c;h=cb002784c2a2bf48b97b9d8921f52fab20ed50df;hp=017ec5e604245bea5385f559b490c49767ef58ab;hb=ad1e3b8cec6c1c6f7d009d5cc2d04453a294914e;hpb=09c113499ad3e65ca1679889c2a0165a52f1cb50 diff --git a/src/srwutil.c b/src/srwutil.c index 017ec5e..cb00278 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -1052,6 +1052,7 @@ int yaz_sru_get_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, char *name[MAX_SRU_PARAMETERS], *value[MAX_SRU_PARAMETERS]; /* definite upper limit for SRU params */ char *uri_args; char *path; + char *cp; z_HTTP_header_add_basic_auth(encode, &hreq->headers, srw_pdu->username, srw_pdu->password); @@ -1061,6 +1062,10 @@ int yaz_sru_get_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, hreq->method = "GET"; + cp = strchr(hreq->path, '#'); + if (cp) + *cp = '\0'; + path = (char *) odr_malloc(encode, strlen(hreq->path) + strlen(uri_args) + 4);