X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=814c0f89d1f1f385be7be5790833190b601af0af;hb=b43961f22658ebf3bc0b15a004bdb3c1c93973e4;hp=35c5ba22ab2360dc95431f14107501e8049ec529;hpb=7b429cd9f6320f71b949f7e90270266b2f617c07;p=yazproxy-moved-to-github.git diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 35c5ba2..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); @@ -3967,6 +3974,7 @@ void Yaz_Proxy::base64_decode(const char *base64, char *buf, int buf_len) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab