Fix handler state change in cowboy_rest
Merge branch 'fix_change_state' of https://github.com/nevar/cowboy