Branch: Tag:

2007-10-08

2007-10-08 15:59:04 by Martin Stjernholm <mast@lysator.liu.se>

Be tolerant with servers that fail to utf8 encode error messages
properly.

Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.108

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.107 2007/05/23 14:54:23 mast Exp $ + // $Id: client.pike,v 1.108 2007/10/08 15:59:04 mast Exp $   //   // Honza Petrous, hop@unibase.cz   //
373:    if (resultstring == "")    resultstring = 0;    else if (ldap_version >= 3) -  resultstring = utf8_to_string (resultstring); +  if (mixed err = catch (resultstring = utf8_to_string (resultstring))) +  DWRITE (sprintf ("Failed to decode result string %O: %s", +  resultstring, describe_error (err)));    DWRITE(sprintf("result.create: str=%O\n",resultstring));   #ifdef V3_REFERRALS    // referral (v3 mode)
659: Inside #if undefined(PARSE_RFCS)
   void create(string|mapping(string:mixed)|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.107 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.108 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;