twirpy icon indicating copy to clipboard operation
twirpy copied to clipboard

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

Open czeitler-asp opened this issue 3 years ago • 0 comments

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.

czeitler-asp avatar Oct 04 '22 21:10 czeitler-asp