revert curling and encoding take 2