File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
engine/src/main/java/io/seldon/engine/api/rest Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1616package io .seldon .engine .api .rest ;
1717
1818import com .fasterxml .jackson .databind .ObjectMapper ;
19+ import com .google .protobuf .ByteString ;
1920import com .google .protobuf .InvalidProtocolBufferException ;
2021import io .micrometer .core .annotation .Timed ;
2122import io .opentracing .Span ;
@@ -175,7 +176,7 @@ public ResponseEntity<String> predictions_binary(RequestEntity<InputStream> requ
175176 try {
176177 ObjectMapper mapper = new ObjectMapper ();
177178 Map <String , Object > protoBody = new HashMap <String , Object >() {{
178- put ("binData" , toByteArray (requestEntity .getBody ()));
179+ put ("binData" , ByteString . copyFrom ( toByteArray (requestEntity .getBody () )));
179180 }};
180181 return _predictions (mapper .writeValueAsString (protoBody ));
181182 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments