JETTY-1086 Use UncheckedPrintWriter
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@801 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
01cb70fc54
commit
37d55422e6
|
@ -2,6 +2,7 @@ jetty-7.0.0.RC6-SNAPSHOT
|
|||
+ 288055 jetty-client fails to resolve failed resolution attempts correctly
|
||||
+ 288153 jetty-client resend doesn't reset exchange
|
||||
+ 288182 PUT request fails during retry
|
||||
+ JETTY-1086 Use UncheckedPrintWriter
|
||||
+ JETTY-1090 resolve potential infinite loop with webdav listener
|
||||
+ JETTY-1093 Request.toString throws exception when size exceeds 4k
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.eclipse.jetty.io.Connection;
|
|||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
import org.eclipse.jetty.io.RuntimeIOException;
|
||||
import org.eclipse.jetty.io.UncheckedPrintWriter;
|
||||
import org.eclipse.jetty.io.BufferCache.CachedBuffer;
|
||||
import org.eclipse.jetty.io.nio.SelectChannelEndPoint;
|
||||
import org.eclipse.jetty.util.QuotedStringTokenizer;
|
||||
|
@ -343,26 +344,7 @@ public class HttpConnection implements Connection
|
|||
if (_writer==null)
|
||||
{
|
||||
_writer=new OutputWriter();
|
||||
_printWriter=new PrintWriter(_writer)
|
||||
{
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* @see java.io.PrintWriter#close()
|
||||
*/
|
||||
public void close()
|
||||
{
|
||||
try
|
||||
{
|
||||
out.close();
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
Log.debug(e);
|
||||
setError();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
_printWriter=new UncheckedPrintWriter(_writer);
|
||||
}
|
||||
_writer.setCharacterEncoding(encoding);
|
||||
return _printWriter;
|
||||
|
|
|
@ -479,9 +479,12 @@ public class ServletHandler extends ScopedHandler
|
|||
|
||||
// handle or log exception
|
||||
if (th instanceof HttpException)
|
||||
{
|
||||
throw (HttpException)th;
|
||||
}
|
||||
else if (th instanceof RuntimeIOException)
|
||||
throw (RuntimeIOException)th;
|
||||
else if (th instanceof EofException)
|
||||
throw (EofException)th;
|
||||
|
||||
else if (Log.isDebugEnabled())
|
||||
{
|
||||
Log.warn(request.getRequestURI(), th);
|
||||
|
|
Loading…
Reference in New Issue