projects
/
yazproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dfdff5f
)
Pass-through x-username and omitted password to Z39.50 target.
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 17 Mar 2009 15:05:55 +0000
(16:05 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 17 Mar 2009 15:05:55 +0000
(16:05 +0100)
src/yaz-proxy.cpp
patch
|
blob
|
history
diff --git
a/src/yaz-proxy.cpp
b/src/yaz-proxy.cpp
index
1d6e22c
..
814c0f8
100644
(file)
--- 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;
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);
{
yaz_log(YLOG_LOG, "username/password: %s/%s\n",
srw_pdu->username, srw_pdu->password);