Maybe I'm a little closer to an explanation: the
org.jboss.resteasy.plugins.providers.DataSourceProvider#readDataSource
method 
<http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DataSourceProvider.java?revision=1349&view=markup>
first tries to read 4096 bytes from the given stream, then checks
in.available() to decide if there is more to write to a temp file.
This is wrong, because java.io.InputStream.available only returns a
guess if there are more bytes available. Here, the given InputStream
ist a java.io.SequenceInputStream that returns 0 after the first chunk
even if more chunks with more bytes are available. The
readDataSourceMethod must continue reading until EOF.

I'll add an issue to the bug tracker:
https://issues.jboss.org/browse/RESTEASY-545

Regards, Jay

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to