DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9780>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9780 Attachments Error serializing DataHandlers that are not backed by FileDataSource [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Normal ------- Additional Comments From [EMAIL PROTECTED] 2002-06-11 18:41 ------- According to the SAAJ 1.1 spec (http://java.sun.com/xml/saaj/index.html), AttachmentPart.getSize() should return the number of bytes in the attachment, or -1 if the size cannot be determined. I propose the following: 1. If MimeUtils can determine the size without reading the stream, return it 2. If MimeUtils can't determine the size, check a REQUIRE_CONTENT_LENGTH property a. If REQUIRE_CONTENT_LENGTH is true, then read the stream, cache the data, and return the size. When the AttachmentPart is serialized, check for the presence of cached data and return it instead of reading the stream b. If REQUIRE_CONTENT_LENGTH is false, return -1. Once -1 is returned, the content length for the entire response message should be fixed to -1, and AxisServlet should not write a content length that is less than 0.