Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

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

Open
Timovzl opened this issue Dec 12, 2017 · 0 comments

Comments

@Timovzl
Copy link

Timovzl commented Dec 12, 2017

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 Timovzl changed the title Content type comparison bug in ProtobufNetBodyDeserializer line 59? (2.0.0-clinteastwood) Content type comparison bug in ProtobufNetBodyDeserializer line 59? Dec 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant