directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Storing binary data in 0.9.1 fails (or data given back from the directory is changed)
Date Fri, 05 Aug 2005 07:06:35 GMT
On Fri, 2005-08-05 at 08:31 +0200, Stefan Zoerner wrote:
> 
> Hi Emmanuel! 
> 
> My fault. I searched JIRA, but have not used clever search terms. I
> will work on that.

Actually, I just googled 'inetorgperson jpegPhoto' to check that it was
not an issue with the schema, and directly found DIREVE-163 on an
archive  mail ! Funny ... I didn't took a chance on JIRA (I'm too
lazzy...)

> Test Case is attached (first JIRA exercise was succesful) to the
> defect. 

Thanks a lot !

> I will try to figure out how your test cases are organized. 

'Organized' is not exactly the perfect word ;) Don't worget that it's a
0.9.1 version, so ...

> Would be better to create something comparable for an official test
> suite. But I guess it is much harder to show this defect from "inside"
> without deeper knowledge how the systems works. 

yep ;( 

Even now, I didn't succeeded to reproduce your problem, because I didn't
found a place to start the debugging ;) As I switched from eclipse 3.0
to 3.1 this week, I didn't had time to go very far with your bug, but
maybe next week? 
However, if you want to dig the pb, the point is that you are to dive
very deep into the ASN.1 stuff, which is quite convoluted. 

I do think that the reason why you bytes are transformed to '?' may be
related to this class :

http://svn.apache.org/viewcvs.cgi/directory/shared/ldap/tags/internal-
release-0.9.1/apache-
provider/src/java/org/apache/ldap/common/berlib/asn1/decoder/add/AddAttributeValueRule.java?rev=224371&view=markup,


where you will find something like :
...
L 84:         // Add the attribute
L 85 :        attrs.put( id, new String( octets ) ) ;
...

the new String( octets ) may really 'kills' bytes, for sure ...

I'm not 100% positive about it be the reason, but I feel unconfortable
with it.

If you feel in the mood to add a test case in
http://svn.apache.org/viewcvs.cgi/directory/shared/ldap/tags/internal-
release-0.9.1/apache-
provider/src/test/org/apache/ldap/common/berlib/asn1/decoder/add/AddRequestTest.java?rev=224371&view=markup,
you may test this hypothesis...


Emmanuel L├ęcharny.

btw, it would be much better to post directly to the dev-list, so you
may share your feelings with all of us, which is always good ;)

Enjoy you friday !



Mime
View raw message