I've run into an issue downloading content using the OpenCMIS 0.4.0 build 
running under WL 10.3.5. Our code works ok under Tomcat v7 and also when unit 
tested in Eclipse Helios. But under WL 10.3.5, the OpenCMIS code path that gets 
invoked for downloading content (through CmisObject.getContentStream()) 
eventually makes an HTTP POST request using the HttpUtils.invoke() method. In 
that class in the 0.4.0 code base, there's a line of code (line 167) that looks 
like this:

OutputStream out = new BufferedOutputStream(conn.getOutputStream(), 
BUFFER_SIZE);

In the 0.4.0 code base, the value for BUFFER_SIZE is set to this:

private static final int BUFFER_SIZE = 2 * 1024 * 1024;

The code then sets HTTP 1.1 chunking with this fragment of code:
// send data
            if (writer != null) {
                conn.setChunkedStreamingMode(BUFFER_SIZE);
                OutputStream out = new 
BufferedOutputStream(conn.getOutputStream(), BUFFER_SIZE);
                writer.write(out);
                out.flush();
            }

Under WL 10.3, trying to do a POST with this big a buffer causes the write to 
fail with an error message that the buffer size must be < 64kb in size.  This 
code worked ok under WL 9 but doesn't work under 10.3.5. Apparently there's 
some new throttling policy on max buffer size that is given to applications. We 
changed the definition of BUFFER_SIZE to be a bit less than 64k and this solved 
the issue.

Seems like this change should be put back into the mainstream code base? If 
this seems right, I'll post a bug on this and you guys can fix it in 0.5.0.

thx,

g
---

[cid:[email protected]]

George Florentine



VP, Engineering



+1 (303) 542-2173  |  Office

+1 (303) 669-8628  |  Cell
+1 (303) 544-0522  |  Fax



[email protected]<mailto:[email protected]>



http://www.flatironssolutions.com<http://www.flatironssolutions.com/>








Reply via email to