Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for binary/octet-stream. #5892

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

corneil
Copy link
Contributor

@corneil corneil commented Aug 7, 2024

Quay.io responds with binary/octet-stream when reading imageBlob.

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

Fixes #5885

Quay.io responds with binary/octet-stream when reading imageBlob.

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

Fixes spring-cloud#5885
@corneil corneil requested review from cppwfs and onobc August 7, 2024 13:10
@corneil corneil force-pushed the main branch 2 times, most recently from c0462f2 to f0fb797 Compare August 8, 2024 11:55
Copy link
Contributor

@onobc onobc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @corneil. A couple of minor comments/suggestions, but other than that LGTM.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a good idea to ensure we have test coverage for this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can only be added with integration test using a quay.io container. We don't have existing integration tests for any of the registries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case a manual test will suffice. But let's be sure we do the manual test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@corneil if you can confirm this I will approve and merge this. Thanks.

@corneil corneil added this to the 2.11.5 milestone Aug 27, 2024
@cppwfs cppwfs added the type/enhancement Is an enhancement request label Sep 6, 2024
@cppwfs cppwfs modified the milestones: 2.11.5, 2.11.x Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Is an enhancement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error extracting the metadata for a Quay.io image
3 participants