cURL / Mailing Lists / curl-library / Single Mail


Re: Ldap URL and binary entries

From: Daniel Stenberg <>
Date: Tue, 31 May 2005 23:19:57 +0200 (CEST)

On Tue, 31 May 2005, Jean-Marc Desperrier wrote:

>> What is a "unsafe character" in this sense? Can't we just write a function
>> that scans for them and encode the data accordingly if any such is found?
> Yes we can. I didn't, and I don't feel that motivated for it, as it's mostly
> the binary zero that are really annoying (but maybe it would be
> significantly better to encode CR/LF too)

So what letters _are_ unsafe then? Or perhaps we should reverse the logic and
only output it as-is if we find it only contains safe letters. I take it this
means safely printable? Like isgraph() and space?

BTW, your patch makes the code not compile for me anymore, since I have no
'struct berval' anywhere...

> Then I'd feel like adding an option like for example :

> as an integer with the following values :
> 0 /* default : do not send raw value, send an ldif formatted result */
> 1 /* send the raw content of the entry, this will be only the first value in
> case of a multi-valued attribute */
>> 1 /* send the n-th value of a multi-valued attribute, send an empty result
> if the n-th value doesn't exist */

I find the mixing of the meaning odd. First, it selects type of output and
then it selects which entry in a multi-valued attribute?

Can't we make the type of output respect CURLOPT_TRANSFERTEXT instead? If we
consider the ldif format to be text, and then add a CURLOPT_LDAPNUMENTRY or

And I haven't really read up on this (yet), but is there really no way to
specify that number using the LDAP URL format?

  Commercial curl and libcurl Technical Support:
Received on 2005-05-31