Hi Alex, hi Stefan
On Sun, 2005-08-07 at 16:21 -0400, Alex Karasulu wrote:
> Stefan Zoerner wrote:
>
> > Hi Alex!
> >
> > I changed my server.xml configuration, i.e. I added the attributes as
> > described to the java.naming.ldap.attributes.binary list.
> > Unfortunatly, it doesn't work, the binary data is still stored/read
> > out wrong. I checked it with Softerra LDAP Administrator and added an
> > inetOrgPerson entry with a jpegPhoto attribute. Photo was damaged.
> > I also ran the test case I added to JIRA DIREVE-163, and it failed as
> > well.
> >
> > Therefore there must be a problem within ApacheDS, or with my
> > configuration skills.
> >
> Ok another bug to nip. Sorry it did not work out. I'll try to get some
> time soon to figure out why this is not working. Thanks for sticking
> through with it to the end.
I've tested an AddRequest with a PDU which contains a jpegPhoto and a
byte[] as its value, and I'm not sure that the
org.apache.ldap.common.berlib.asn1.decoder.add.AddAttributeValueRule.finish()
method does the right thing when creating a String with the bytes it get.
the line before the last line is :
...
// Add the attribute
attrs.put( id, new String( octets ) ) ;
...
and should be
...
// Add the value
attrs.put( id, octets ) ;
...
If the bytes are above 128, you will just transform the bytes to a bad
Value. I think that the value, as it is supposed to be an OctetString,
should be stored directly without creating a new String.
wdyt Alex ?
Emmanuel
>
> Alex
> ---------------------------------------------------------------------------------------
> Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>