Skip to content

Commit

Permalink
Add support for binary/octet-stream.
Browse files Browse the repository at this point in the history
Quay.io responds with binary/octet-stream when reading imageBlob.

application/octet-stream is identical to binary/octet-stream.

Fixes spring-cloud#5885
  • Loading branch information
corneil committed Aug 7, 2024
1 parent 8f6a793 commit 4883a34
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private RestTemplate initRestTemplate(HttpClientBuilder clientBuilder, boolean w
ArrayList<MediaType> mediaTypeList = new ArrayList(octetSupportJsonConverter.getSupportedMediaTypes());
mediaTypeList.add(MediaType.APPLICATION_OCTET_STREAM);
mediaTypeList.add(MediaType.TEXT_PLAIN);
mediaTypeList.add(MediaType.parseMediaType("binary/octet-stream")); // quay.io responds with binary/octet-stream instead of application/octet-stream
octetSupportJsonConverter.setSupportedMediaTypes(mediaTypeList);

return restTemplateBuilder
Expand Down

0 comments on commit 4883a34

Please sign in to comment.