> Date: Mon, 23 Feb 2004 13:47:07 -0600 (CST)
> From: Craig Dunigan <[EMAIL PROTECTED]>
> To: Dave Halsema <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: ->add() ->replace() always convert attr names to lowercase?
>
> Yes. It's part of the LDAP standard that attribute names must be
> case-insensitive. Most LDAP servers will only send all lower case.
> Anyway, perl doesn't control it, the LDAP server does. Your code is
> expected to know the standard, and do only case-insensitive matching.
>
> Craig Dunigan
>
> On Mon, 23 Feb 2004, Dave Halsema wrote:
>
> > A simple question, but I wanted to verify that perl LDAP is functioning
> > as expected. If I do something like the following:
> >
> > $entry->add('mailLocalAddress' => '[EMAIL PROTECTED]');
> >
> > my attribute name is always converted to lowercase letters. (When I
> > dump $entry the attr name is 'maillocaladdress'). Obviously it makes
> > no operational difference, but aesthetically it is changed.
> >
> > Is this the behavior I should be seeing?
> >
> > It's the same result using perl-ldap 0.31 under Solaris/perl-5.6.1
> > and Linux/perl-5.8.0. Thanks!
> >
> > -Dave
> >
>
>
Thanks for you help, I understand the attribute name searches are
case-insensitive. I wanted to clarify my meaning of of the word
"dump" in my earlier posting.
When I do the following, I see the attribute name converted to
lowercase in my Net::LDAP::Entry object. This is before I even send
an update to the LDAP server.
$entry->add('mailLocalAddress' => '[EMAIL PROTECTED]');
$entry->dump;
Output:
maillocaladdress: [EMAIL PROTECTED]
When adding entries into our OpenLDAP 2.1 server using ldapadd or
ldapmodify and LDIF, it preserves the case of the attributes, which
improves readability when dumping an entry.
Is this the correct behavior, is there a workaround, or am I just
being unreasonable? :-)
-Dave