Mercurial Hosting > luan
diff src/org/eclipse/jetty/http/AbstractGenerator.java @ 1031:921c25a05eaa
remove Buffer.asReadOnlyBuffer()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 02:04:40 -0600 |
parents | 8c13b9224cff |
children | 563458c4dc93 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/AbstractGenerator.java Thu Nov 03 01:10:09 2016 -0600 +++ b/src/org/eclipse/jetty/http/AbstractGenerator.java Thu Nov 03 02:04:40 2016 -0600 @@ -25,7 +25,6 @@ import org.eclipse.jetty.io.ByteArrayBuffer; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EofException; -import org.eclipse.jetty.io.View; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -245,7 +244,7 @@ // TODO don't hard code if (len>1024) len=1024; - _reason=new ByteArrayBuffer(len); + _reason = new ByteArrayBuffer(len); for (int i=0;i<len;i++) { char ch = reason.charAt(i); @@ -365,12 +364,12 @@ if (content != null) { completeHeader(null, false); - addContent(new View(new ByteArrayBuffer(content)), LAST); + addContent(new ByteArrayBuffer(content), LAST); } else if (code>=400) { completeHeader(null, false); - addContent(new View(new ByteArrayBuffer("Error: "+(reason==null?(""+code):reason))), LAST); + addContent(new ByteArrayBuffer("Error: "+(reason==null?(""+code):reason)), LAST); } else {