- sprintf(path, "%s/%s?%s", hreq->path, solr_op, uri_args);
+ strcpy(path, hreq->path);
+ cp = strrchr(path, '/');
+ if (cp)
+ {
+ if (!strcmp(cp, "/select") || !strcmp(cp, "/"))
+ *cp = '\0';
+ }
+ strcat(path, "/");
+ strcat(path, solr_op);
+ strcat(path, "?");
+ strcat(path, uri_args);