nitrogen / simple_bridge

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

Correctly convert 'undefined' to list and binary (i.e convert at all) #57

Closed brigadier closed 8 years ago

brigadier commented 8 years ago

Though I'm not sure if these changes are enough - there's some suspictious code for headers as well.

choptastic commented 8 years ago

I appreciate the pull request, but I'm not super keen on redefining to_binary and to_list to treat the atom 'undefined' as special.

Perhaps a maybe_to_list and maybe_to_binary might be the solution.

Whaddya think?

brigadier commented 8 years ago

K, I'll do new pull tomorrow, with maybe_tolist. I think the `maybefunctions should be used innormalize_param,find_param,find_param_grouponly? CanBodyinrequest_bodypossible beundefined`?

brigadier commented 8 years ago

https://github.com/nitrogen/simple_bridge/pull/58