Z_SRW_PDU *sru_pdu_res,
Z_SRW_searchRetrieveRequest const *sr_req,
std::string zurl,
- const char *db_append
+ std::string db_append
) const;
bool z3950_present_request(
bool enable_package_log = false;
std::string zurl;
- const char *dbargs = 0;
+ std::string dbargs;
Z_SRW_extra_arg *arg;
for ( arg = sru_pdu_req->extra_args; arg; arg = arg->next)
package.log_enable();
}
}
- else if (!strcmp(arg->name, "x-dbargs"))
+ else if (!strncmp(arg->name, "x-client-", 9) && arg->value)
{
- dbargs = arg->value;
+ if (dbargs.length())
+ dbargs += '&';
+ dbargs += mp_util::uri_encode(arg->name + 9);
+ dbargs += '=';
+ dbargs += mp_util::uri_encode(arg->value);
}
assert(sru_pdu_req);
Z_SRW_searchRetrieveRequest
const *sr_req,
std::string zurl,
- const char *dbappend) const
+ std::string dbappend) const
{
assert(sru_pdu_res->u.response);
else
db = "Default";
- if (dbappend)
+ if (dbappend.length())
{
db += ",";
db += dbappend;