verloop / twirpy

Twirp's python implementation
The Unlicense
103 stars 20 forks source link

Respond with BadRoute instead of Internal error by fixing bug with content-type evaluation #47

Open czeitler-asp opened 2 years ago

czeitler-asp commented 2 years ago

Fix for Issue #46. Instead of defaulting content-type to None in _get_encoder_decoder, instead default it to an empty string. If the content-type header is missing, then the error message will be unexpected Content-Type: instead of raising a type error when attempting to concatenate None to a str.