From: Adam Dickmeiss Date: Tue, 17 Mar 2009 15:05:55 +0000 (+0100) Subject: Pass-through x-username and omitted password to Z39.50 target. X-Git-Tag: v1.3.5~6 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=3481ecb892e17f707a06335f955e65e62be35f30;p=yazproxy-moved-to-github.git Pass-through x-username and omitted password to Z39.50 target. --- diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 1d6e22c..814c0f8 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2819,7 +2819,14 @@ void Yaz_Proxy::handle_incoming_HTTP(Z_HTTP_Request *hreq) m_s2z_stylesheet = 0; Z_IdAuthentication *auth = NULL; - if (srw_pdu->username && srw_pdu->password) + if (srw_pdu->username && !srw_pdu->password) + { + yaz_log(YLOG_LOG, "username: %s\n", srw_pdu->username); + auth = (Z_IdAuthentication *) odr_malloc(m_s2z_odr_init, sizeof(Z_IdAuthentication)); + auth->which = Z_IdAuthentication_open; + auth->u.open = odr_strdup(m_s2z_odr_init, srw_pdu->username); + } + else if (srw_pdu->username && srw_pdu->password) { yaz_log(YLOG_LOG, "username/password: %s/%s\n", srw_pdu->username, srw_pdu->password);