diff options
author | Raviteja Cherughattu <rc835m@att.com> | 2020-07-29 14:36:17 -0500 |
---|---|---|
committer | Raviteja Cherughattu <rc835m@att.com> | 2020-07-29 14:36:17 -0500 |
commit | bdb54b7c8a5df0e686490658067c9013ee43dd7a (patch) | |
tree | ce291e2172a5440d877baedf6214c84823c21c13 /cadi/client | |
parent | de75a11f03d87b53f7a2b5525c8fc66f6053aef2 (diff) |
Medium Vulnerabilities CodeFix: Revert [Ref ID: 108330]
Issue-ID: AAF-1115
Change-Id: I8e503ee84eb2771edbf2ed94f5d7f8f2e20812c7
Signed-off-by: Raviteja Cherughattu <rc835m@att.com>
Diffstat (limited to 'cadi/client')
-rw-r--r-- | cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java index 898b99c9..199276bc 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HClient.java @@ -47,7 +47,6 @@ import org.onap.aaf.misc.env.Data; import org.onap.aaf.misc.env.Data.TYPE; import org.onap.aaf.misc.env.util.Pool.Pooled; import org.onap.aaf.misc.rosetta.env.RosettaDF; -import org.owasp.encoder.Encode; /** * Low Level Http Client Mechanism. Chances are, you want the high level "HRcli" * for Rosetta Object Translation @@ -395,11 +394,9 @@ public class HClient implements EClient<HttpURLConnection> { is = huc.getInputStream(); // reuse Buffers Pooled<byte[]> pbuff = Rcli.buffPool.get(); - try { - String strTemp; + try { while ((read=is.read(pbuff.content))>=0) { - strTemp = new String(pbuff.content,0,read); - os.write(Encode.forJava(strTemp).getBytes()); + os.write(pbuff.content,0,read); } } finally { pbuff.done(); @@ -413,11 +410,9 @@ public class HClient implements EClient<HttpURLConnection> { if (is!=null) { errContent = new StringBuilder(); Pooled<byte[]> pbuff = Rcli.buffPool.get(); - try { - String strTemp; + try { while ((read=is.read(pbuff.content))>=0) { - strTemp = new String(pbuff.content,0,read); - os.write(Encode.forJava(strTemp).getBytes()); + os.write(pbuff.content,0,read); } } finally { pbuff.done(); |