X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-ir-assoc.cpp;h=ef084a1ed5341236ed73ba6f41529391c1760a79;hb=e08f9ff89133cbc295dda92b9c863ddd288569d1;hp=a88888d75aef3700b8ad5b66cf243dd07be548be;hpb=5c45ffbb2b430a6f41277c303a5e9b94242dab96;p=yazpp-moved-to-github.git diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index a88888d..ef084a1 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-ir-assoc.cpp,v $ - * Revision 1.7 1999-04-21 12:09:01 adam + * Revision 1.8 1999-04-28 13:04:03 adam + * Fixed setting of proxy otherInfo so that database(s) are removed. + * + * Revision 1.7 1999/04/21 12:09:01 adam * Many improvements. Modified to proxy server to work with "sessions" * based on cookies. * @@ -369,7 +372,15 @@ int Yaz_IR_Assoc::send_initRequest() ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_3); if (m_proxy && m_host) - set_otherInformationString(&req->otherInfo, VAL_PROXY, 1, m_host); + { + char *rawhost = new char[strlen(m_host)+1]; + strcpy(rawhost, m_host); + char *dbpart = strchr(rawhost, '/'); + if (dbpart) + *dbpart = '\0'; + set_otherInformationString(&req->otherInfo, VAL_PROXY, 1, rawhost); + delete [] rawhost; + } if (m_cookie) set_otherInformationString(&req->otherInfo, VAL_COOKIE, 1, m_cookie); return send_Z_PDU(apdu);