mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
RecognizingDecoder didn't handle ambiguous input
YAML is not guaranteed to be recognizable, so we need to bump JSON and protobuf above it in the decoding order. Add a unit test.
This commit is contained in:
@@ -419,12 +419,6 @@ func (s *RawSerializer) EncodeToStream(obj runtime.Object, w io.Writer, override
|
||||
}
|
||||
}
|
||||
|
||||
// RecognizesData implements the RecognizingDecoder interface - objects encoded with this serializer
|
||||
// have no innate identifying information and so cannot be recognized.
|
||||
func (s *RawSerializer) RecognizesData(peek io.Reader) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
var LengthDelimitedFramer = lengthDelimitedFramer{}
|
||||
|
||||
type lengthDelimitedFramer struct{}
|
||||
|
||||
Reference in New Issue
Block a user