chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Lauricella" <slaur...@opentext.com>
Subject Content stream ranges in java implementation of Atompub binding
Date Fri, 02 Dec 2011 08:39:08 GMT
Hi there,

I'm experiencing an issue in the Java implementation of the atompub
binding.
The client requests a content stream indicating a offset and length
(e.g. offset=5 length=10). I realized the HttpUtils client class
converts such values into a request property like Range=4-13.
The HttpUtils server class seems not to convert such a range back
correctly since our server implementation gets offset=5 and length=9.

I found the following.
The org.apache.chemistry.opencmis.client.bindings.spi.atompub.HttpUtils
has the following line in the invoke method
 
sb.append(offset.add(length.subtract(BigInteger.ONE)).toString());

The org.apache.chemistry.opencmis.server.shared.HttpUtils forgets to
re-add the one byte in the line
                            length = (new
BigInteger(lengthStr)).subtract(offset);

I'm using the 0.3.0 version of the OpenCmis bundle. I observed the same
issue is still present in the 0.5.0 version.

Regards,
Stefano

Mime
View raw message