View | Details | Raw Unified | Return to bug 39572
Collapse All | Expand All

(-)C:\Documents and Settings\ehedstro\Local Settings\Temp\t988t3.tmp (-3 / +12 lines)
Lines 16-21 Link Here
16
package org.apache.compressionFilters;
16
package org.apache.compressionFilters;
17
17
18
import java.io.IOException;
18
import java.io.IOException;
19
import java.io.OutputStream;
19
import java.util.zip.GZIPOutputStream;
20
import java.util.zip.GZIPOutputStream;
20
import javax.servlet.ServletOutputStream;
21
import javax.servlet.ServletOutputStream;
21
import javax.servlet.http.HttpServletResponse;
22
import javax.servlet.http.HttpServletResponse;
Lines 79-85 Link Here
79
    /**
80
    /**
80
     * The underlying gzip output stream to which we should write data.
81
     * The underlying gzip output stream to which we should write data.
81
     */
82
     */
82
    protected GZIPOutputStream gzipstream = null;
83
    protected OutputStream gzipstream = null;
83
84
84
    /**
85
    /**
85
     * Has this stream been closed?
86
     * Has this stream been closed?
Lines 293-300 Link Here
293
            if (debug > 1) {
294
            if (debug > 1) {
294
                System.out.println("new GZIPOutputStream");
295
                System.out.println("new GZIPOutputStream");
295
            }
296
            }
296
            response.addHeader("Content-Encoding", "gzip");
297
            if (response.isCommitted()) {
297
            gzipstream = new GZIPOutputStream(output);
298
                if (debug > 1) {
299
                    System.out.println("response already committed, using original outputstream");
300
                }
301
                gzipstream = output;
302
            } else {            
303
                response.addHeader("Content-Encoding", "gzip");
304
                gzipstream = new GZIPOutputStream(output);
305
            }
306
            
298
        }
307
        }
299
        gzipstream.write(b, off, len);
308
        gzipstream.write(b, off, len);
300
309

Return to bug 39572