ASF Bugzilla – Attachment 18266 Details for
Bug 39572
fixes to use CompressionFilter in WebSphere app server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to not compress committed response stream
CompressionResponseStream.patch (text/plain), 1.44 KB, created by
Eric Hedstr
on 2006-05-12 22:30:00 UTC
(
hide
)
Description:
patch to not compress committed response stream
Filename:
MIME Type:
Creator:
Eric Hedstr
Created:
2006-05-12 22:30:00 UTC
Size:
1.44 KB
patch
obsolete
>--- C:\Documents and Settings\ehedstro\Local Settings\Temp\t988t3.tmp Fri May 12 15:20:53 2006 >+++ c:\dev\sharedtech\cwc\main\src\org\apache\compressionFilters\CompressionResponseStream.java Fri May 12 15:19:52 2006 >@@ -16,6 +16,7 @@ > package org.apache.compressionFilters; > > import java.io.IOException; >+import java.io.OutputStream; > import java.util.zip.GZIPOutputStream; > import javax.servlet.ServletOutputStream; > import javax.servlet.http.HttpServletResponse; >@@ -79,7 +80,7 @@ > /** > * The underlying gzip output stream to which we should write data. > */ >- protected GZIPOutputStream gzipstream = null; >+ protected OutputStream gzipstream = null; > > /** > * Has this stream been closed? >@@ -293,8 +294,16 @@ > if (debug > 1) { > System.out.println("new GZIPOutputStream"); > } >- response.addHeader("Content-Encoding", "gzip"); >- gzipstream = new GZIPOutputStream(output); >+ if (response.isCommitted()) { >+ if (debug > 1) { >+ System.out.println("response already committed, using original outputstream"); >+ } >+ gzipstream = output; >+ } else { >+ response.addHeader("Content-Encoding", "gzip"); >+ gzipstream = new GZIPOutputStream(output); >+ } >+ > } > gzipstream.write(b, off, len); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39572
: 18266 |
18267