Include proto.h for prototype of yaz_use_attribute_create
[yaz-moved-to-github.git] / src / solr.c
index e9d3dcf..4ae57bb 100644 (file)
@@ -18,6 +18,7 @@
 #include <yaz/log.h>
 #include <yaz/facet.h>
 #include <yaz/wrbuf.h>
+#include <yaz/proto.h>
 
 #include "sru-p.h"
 
@@ -583,6 +584,9 @@ int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu,
         odr_malloc(encode, strlen(hreq->path) +
                    strlen(uri_args) + strlen(solr_op) + 5);
 
+    cp = strchr(hreq->path, '#');
+    if (cp)
+        *cp = '\0';
     cp = strchr(hreq->path, '?');
     if (cp)
     {