Created
October 3, 2013 21:19
-
-
Save mss/6817300 to your computer and use it in GitHub Desktop.
Fix for JERSEY-2126 aka dropwizard issue 403
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/main/java/com/sun/jersey/client/apache4/ApacheHttpClient4Handler.java | |
=================================================================== | |
--- src/main/java/com/sun/jersey/client/apache4/ApacheHttpClient4Handler.java (revision 5854) | |
+++ src/main/java/com/sun/jersey/client/apache4/ApacheHttpClient4Handler.java (working copy) | |
@@ -71,6 +71,7 @@ | |
import javax.ws.rs.core.MultivaluedMap; | |
import java.io.BufferedInputStream; | |
import java.io.ByteArrayInputStream; | |
+import java.io.ByteArrayOutputStream; | |
import java.io.Closeable; | |
import java.io.FilterInputStream; | |
import java.io.IOException; | |
@@ -254,7 +255,9 @@ | |
@Override | |
public InputStream getContent() throws IOException, IllegalStateException { | |
- return null; | |
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream(512); | |
+ writeTo(buffer); | |
+ return new ByteArrayInputStream(buffer.toByteArray()); | |
} | |
@Override |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment