Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 72028 invoked by uid 500); 9 Feb 2003 10:36:53 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 72016 invoked from network); 9 Feb 2003 10:36:53 -0000 Date: 9 Feb 2003 10:38:35 -0000 Message-ID: <20030209103835.23535.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: cocoon-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 16903] - No caching if serializer buffer-size < content length X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=16903 No caching if serializer buffer-size < content length ------- Additional Comments From unico@hippo.nl 2003-02-09 10:38 ------- Found some time for preparing a patch. Note that these are diffs against the cocoon_2_0_3_branch. Basically what I did was change CachedStreamObject so that it is constructed with a CachingOutputStream instead of a byte array and changed its getResponse method to get the bytes from that stream on its first call. The other diff is for CachingStreamPipeline accordingly this change. Please review and apply. cvs diff CachedStreamObject.java (in directory D:\apache\xml\xml-cocoon203 \src\java\org\apache\cocoon\caching\) Index: CachedStreamObject.java =================================================================== RCS file: /home/cvspublic/xml- cocoon2/src/java/org/apache/cocoon/caching/Attic/CachedStreamObject.java,v retrieving revision 1.6.2.1 diff -r1.6.2.1 CachedStreamObject.java 53a54 > import org.apache.cocoon.caching.CachingOutputStream; 63a65 > private CachingOutputStream outputStream; 74c76 < byte[] response) { --- > CachingOutputStream outputStream) { 76c78 < this.response = response; --- > this.outputStream = outputStream; 104a107,110 > if (this.response == null) { > response = outputStream.getContent(); > outputStream = null; > } cvs diff CachingStreamPipeline.java (in directory D:\apache\xml\xml-cocoon203 \src\java\org\apache\cocoon\components\pipeline\) Index: CachingStreamPipeline.java =================================================================== RCS file: /home/cvspublic/xml- cocoon2/src/java/org/apache/cocoon/components/pipeline/Attic/CachingStreamPipeli ne.java,v retrieving revision 1.8.2.4 diff -r1.8.2.4 CachingStreamPipeline.java 263c263 < ((CachingOutputStream)outputStream).getContent ())); --- > (CachingOutputStream)outputStream)); 417d416 < byte[] bytes = ((CachingOutputStream) outputStream).getContent(); 419c418 < new CachedStreamObject(validityObjects, bytes)); --- > new CachedStreamObject(validityObjects, (CachingOutputStream)outputStream)); --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org