Nancy.Serialization.ProtBuf icon indicating copy to clipboard operation
Nancy.Serialization.ProtBuf copied to clipboard

(2.0.0-clinteastwood) Content type comparison bug in ProtobufNetBodyDeserializer line 59?

Open Timovzl opened this issue 8 years ago • 0 comments

Description

In ProtobufNetBodyDeserializer, take a look at line 59:

if (mediaRange.Type.Matches(Constants.ProtoBufContentType))

This line compares just the type (application), i.e. without the subtype, against the full constant (application/x-protobuf). It seems to me that this will always return false.

I noticed this because Nancy's Bind<> method was not deserializing the protobuf request body.

Timovzl avatar Dec 12 '17 16:12 Timovzl