fix: Docker API compatible bool deserialization

In Docker anything but "", "0", "no", "false", "none" (ignoring case) is considered to be true.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek
2023-08-10 23:47:09 +02:00
parent 4cb2d48ca4
commit f33b01b731
27 changed files with 82 additions and 52 deletions

View File

@ -90,6 +90,7 @@ func newServer(runtime *libpod.Runtime, listener net.Listener, opts entities.Ser
server.BaseContext = func(l net.Listener) context.Context {
ctx := context.WithValue(context.Background(), types.DecoderKey, handlers.NewAPIDecoder())
ctx = context.WithValue(ctx, types.CompatDecoderKey, handlers.NewCompatAPIDecoder())
ctx = context.WithValue(ctx, types.RuntimeKey, runtime)
ctx = context.WithValue(ctx, types.IdleTrackerKey, tracker)
return ctx