Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-04-25 11:08:47 +0000
committerThomas Becker2012-04-25 11:08:47 +0000
commit8e4f2bb4121966b3e3b73d2b1ac64a3d6bfd87ff (patch)
tree5334e9108c4625ab24794f2abb595cb6709a3eeb /jetty-http/src
parentfbac246a41656a4bdeb8d74d6e9d7c4deca9bb3b (diff)
downloadorg.eclipse.jetty.project-8e4f2bb4121966b3e3b73d2b1ac64a3d6bfd87ff.tar.gz
org.eclipse.jetty.project-8e4f2bb4121966b3e3b73d2b1ac64a3d6bfd87ff.tar.xz
org.eclipse.jetty.project-8e4f2bb4121966b3e3b73d2b1ac64a3d6bfd87ff.zip
New test for GzipFilter that tests writing a text message to the outputstream and setting the status code afterwards
Diffstat (limited to 'jetty-http/src')
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/gzip/AbstractCompressedStream.java2
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/AbstractCompressedStream.java b/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/AbstractCompressedStream.java
index 77ac1fe41d..39aaa99516 100644
--- a/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/AbstractCompressedStream.java
+++ b/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/AbstractCompressedStream.java
@@ -260,7 +260,7 @@ public abstract class AbstractCompressedStream extends ServletOutputStream
public void doNotCompress() throws IOException
{
if (_compressedOutputStream != null)
- throw new IllegalStateException();
+ throw new IllegalStateException("Compressed output stream is already assigned.");
if (_out == null || _bOut != null)
{
_doNotCompress = true;
diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java b/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java
index 1431f3868e..e439a9d511 100644
--- a/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java
+++ b/jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java
@@ -124,7 +124,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
public void setStatus(int sc)
{
super.setStatus(sc);
- if (sc<200 || sc==204 || sc==205 ||sc>=300)
+ if (sc<200 || sc==204 || sc==205 || sc>=300)
noCompression();
}
@@ -344,7 +344,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
else if (_writer!=null)
throw new IllegalStateException("getWriter() called");
- return (ServletOutputStream)_compressedStream;
+ return _compressedStream;
}
/* ------------------------------------------------------------ */
@@ -366,7 +366,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
}
_compressedStream=newCompressedStream(_request,(HttpServletResponse)getResponse(),_contentLength,_bufferSize,_minCompressSize);
- _writer=newWriter((OutputStream)_compressedStream,getCharacterEncoding());
+ _writer=newWriter(_compressedStream,getCharacterEncoding());
}
return _writer;
}

Back to the top