gdu = z_get_HTTP_Request_host_path(out, host_port, path);
+ if (auth)
+ {
+ if (auth->which == Z_IdAuthentication_open)
+ {
+ char **darray;
+ int num;
+ nmem_strsplit(out->mem, "/", auth->u.open, &darray, &num);
+ if (num >= 1)
+ sr->username = darray[0];
+ if (num >= 2)
+ sr->password = darray[1];
+ }
+ else if (auth->which == Z_IdAuthentication_idPass)
+ {
+ sr->username = auth->u.idPass->userId;
+ sr->password = auth->u.idPass->password;
+ }
+ }
+
if (!yaz_matchstr(sru_method, "get"))
{
yaz_sru_get_encode(gdu->u.HTTP_Request, sr, out, charset);
return r;
}
-static Z_External *create_external_ILL_APDU(int which)
+static Z_External *create_external_ILL_APDU(void)
{
struct ill_get_ctl ctl;
ILL_APDU *ill_apdu;
{
printf("using ILL-request\n");
r->u.itemOrder->u.esRequest->notToKeep->itemRequest =
- create_external_ILL_APDU(ILL_APDU_ILL_Request);
+ create_external_ILL_APDU();
}
else if (!strcmp(type, "xml") || !strcmp(type, "3"))
{
{
line_in=readline(C_PROMPT);
if (!line_in)
+ {
+ putchar('\n');
break;
+ }
#if HAVE_READLINE_HISTORY_H
if (*line_in)
add_history(line_in);