nitrogen / simple_bridge

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

Incorrect processing of post requests with abnormal content type #69

Closed meike-hecker closed 5 years ago

meike-hecker commented 5 years ago

It seems simple bridge tries to parse the body as "application/x-www-urlencoded" when ever a request is not multipart. There are plenty of content-types and use cases where this is not valid. At least in the case of cowboy this behaviour leads to a crash. I stumbled about it while building a rest api, that accepts "application/my-app-binary" without urlencoding the content.

meike-hecker commented 5 years ago

70 corresponding PR

meike-hecker commented 5 years ago

This is a bug in simple bridge. It is incorrect to parse content body as urlencoded when it isn't urlencoded.

choptastic commented 5 years ago

I understand. I've merged your PR, which is why I closed this issue.

meike-hecker commented 5 years ago

Yes sorry, just realized...