You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Stefano Lauricella <sl...@opentext.com> on 2011/12/02 09:39:08 UTC

Content stream ranges in java implementation of Atompub binding

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