further updates to rest_proxy.php

Thanks to Travis at marketcake.com