camallo / dkregistry-rs

A pure-Rust asynchronous library for Docker Registry API v2
Apache License 2.0
62 stars 39 forks source link

v2/client: trim content-type parameters #83

Open lucab opened 5 years ago

lucab commented 5 years ago

This is a followup to https://github.com/camallo/dkregistry-rs/pull/82#issuecomment-453737148.

Current docker-registry specification and implementation have some quirks related to content-type headers, returning charset parameters even for media-types that don't allow any.

As a minor compatibility fix, we should revert https://github.com/camallo/dkregistry-rs/pull/82 and instead introduce a mime_trim_params that expunges all parameters from a media type.

schrieveslaach commented 4 years ago

@lucab, I noticed that there are also errors with Nexus 3 (see aixigo/prevant#44). Is this issue related to it?

lucab commented 4 years ago

@schrieveslaach no, your troubles seem unrelated to this specific issue. I think you are just hitting some content-negotiation bug, and it wouldn't be the first registry we encounter with some buggy logic. It would be helpful to have a minimal Rust example to look at and a trace at the HTTP level.

schrieveslaach commented 4 years ago

@lucab, sorry for interfering. It is an issue of Nexus 3.