nitrogen / simple_bridge

A simple, standardized interface library to Erlang HTTP Servers.
MIT License
112 stars 76 forks source link

fix parsing of post req for non default content types #70

Closed meike-hecker closed 5 years ago

meike-hecker commented 5 years ago

sbw:cache_post_params should not be called if the requests content-type is not application/x-www-urlencoded. At least in case of cowboy it results in a crash if the binary contains unparsable content.

choptastic commented 5 years ago

Thanks. There was one error here, in that the content type should be x-www-form-urlencoded, but the provided one was only x-www-urlencoded. I've updated it accordingly, Thanks again! I always appreciate pull requests!