Permalink
Browse files

[#1622] RenderBinary.apply does check for >0 instead of >-1 for readi…

…ng from the stream.
  • Loading branch information...
1 parent 538549c commit 534900a4e9ec4e5df181ae9b65002bd0ae54207a @Notalifeform Notalifeform committed Feb 9, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/src/play/mvc/results/RenderBinary.java
@@ -166,7 +166,7 @@ public void apply(Request request, Response response) {
try {
byte[] buffer = new byte[8192];
int count = 0;
- while ((count = is.read(buffer)) > 0) {
+ while ((count = is.read(buffer)) > -1) {
response.out.write(buffer, 0, count);
}
}

0 comments on commit 534900a

Please sign in to comment.