You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2020/05/17 16:26:24 UTC

svn commit: r1877868 - in /pdfbox/branches/issue45: ./ examples/src/test/java/org/apache/wink/client/MockHttpServer.java

Author: lehmi
Date: Sun May 17 16:26:24 2020
New Revision: 1877868

URL: http://svn.apache.org/viewvc?rev=1877868&view=rev
Log:
PDFBOX-4071: ensure that all needed bytes are read

Modified:
    pdfbox/branches/issue45/   (props changed)
    pdfbox/branches/issue45/examples/src/test/java/org/apache/wink/client/MockHttpServer.java

Propchange: pdfbox/branches/issue45/
------------------------------------------------------------------------------
  Merged /pdfbox/branches/2.0:r1877867

Modified: pdfbox/branches/issue45/examples/src/test/java/org/apache/wink/client/MockHttpServer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/examples/src/test/java/org/apache/wink/client/MockHttpServer.java?rev=1877868&r1=1877867&r2=1877868&view=diff
==============================================================================
--- pdfbox/branches/issue45/examples/src/test/java/org/apache/wink/client/MockHttpServer.java (original)
+++ pdfbox/branches/issue45/examples/src/test/java/org/apache/wink/client/MockHttpServer.java Sun May 17 16:26:24 2020
@@ -41,6 +41,8 @@ import javax.net.ssl.SSLServerSocketFact
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 
+import org.apache.pdfbox.io.IOUtils;
+
 /**
  * Copied from
  * http://svn.apache.org/repos/asf/wink/trunk/wink-component-test-support/src/main/java/org/apache/wink/client/MockHttpServer.java
@@ -337,7 +339,7 @@ public class MockHttpServer extends Thre
             }
             int contentLen = Integer.parseInt(contentLength);
             byte[] bytes = new byte[contentLen];
-            is.read(bytes);
+            IOUtils.populateBuffer(is, bytes);
             requestContent.write(bytes);
         }