diff options
author | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-11-17 12:58:21 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-11-17 12:58:21 +0100 |
commit | 623f62fe513b19bad39be2002c482e23bc8a4a07 (patch) | |
tree | 052dc3352a207cd3884d0ca3a4dfda6e03454526 /controller-api | |
parent | 1a1f46e024fccc5c783c93074e79e33279c97428 (diff) |
Use byte array for proxy response
Diffstat (limited to 'controller-api')
-rw-r--r-- | controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ProxyResponse.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ProxyResponse.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ProxyResponse.java index 1e9a3b4c4c8..28aaa29408e 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ProxyResponse.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ProxyResponse.java @@ -5,7 +5,6 @@ import com.yahoo.container.jdisc.HttpResponse; import java.io.IOException; import java.io.OutputStream; -import java.nio.charset.StandardCharsets; import java.util.Optional; /** @@ -13,10 +12,10 @@ import java.util.Optional; */ public class ProxyResponse extends HttpResponse { - private final String content; + private final byte[] content; private final String contentType; - public ProxyResponse(String content, String contentType, int status) { + public ProxyResponse(byte[] content, String contentType, int status) { super(status); this.content = content; this.contentType = contentType; @@ -24,7 +23,7 @@ public class ProxyResponse extends HttpResponse { @Override public void render(OutputStream outputStream) throws IOException { - outputStream.write(content.getBytes(StandardCharsets.UTF_8)); + outputStream.write(content); } @Override |